Index: c/src/exec/ChangeLog
===================================================================
--- c/src/exec/ChangeLog	(revision b8caf37ea31d11f121f26c0b1d9a41f0326ba82f)
+++ c/src/exec/ChangeLog	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
@@ -1,2 +1,9 @@
+2002-01-07	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+	* wrapup/Makefile.am: Add install-hook. 
+	Remove SIZE_RTEMS.
+	* include/rtems/fs.h: New, extracted from libio_.h.
+	* include/rtems/userenv.h: New. extracted from libio_.h.
+
 2002-02-05	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
 
Index: c/src/exec/include/rtems/fs.h
===================================================================
--- c/src/exec/include/rtems/fs.h	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
+++ c/src/exec/include/rtems/fs.h	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
@@ -0,0 +1,59 @@
+/*
+ *  Some basic filesystem types
+ *
+ *  COPYRIGHT (c) 1989-1999.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.OARcorp.com/rtems/license.html.
+ *
+ *  $Id$
+ */
+
+#ifndef __rtems_fstypes_h
+#define __rtems_fstypes_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ *  File descriptor Table Information
+ */
+
+/* Forward declarations */
+
+/* FIXME: shouldn't this better not be here? */ 
+typedef struct rtems_libio_tt rtems_libio_t;
+
+typedef struct rtems_filesystem_location_info_tt
+    rtems_filesystem_location_info_t;
+
+struct rtems_filesystem_mount_table_entry_tt;
+typedef struct rtems_filesystem_mount_table_entry_tt
+    rtems_filesystem_mount_table_entry_t;
+
+typedef struct _rtems_filesystem_file_handlers_r 
+    rtems_filesystem_file_handlers_r;
+typedef struct _rtems_filesystem_operations_table 
+    rtems_filesystem_operations_table;
+
+/*
+ * Structure used to determine a location/filesystem in the tree.
+ */
+  
+struct rtems_filesystem_location_info_tt
+{
+   void                                 *node_access;
+   rtems_filesystem_file_handlers_r     *handlers;
+   rtems_filesystem_operations_table	*ops;
+   rtems_filesystem_mount_table_entry_t *mt_entry;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
Index: c/src/exec/include/rtems/userenv.h
===================================================================
--- c/src/exec/include/rtems/userenv.h	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
+++ c/src/exec/include/rtems/userenv.h	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
@@ -0,0 +1,79 @@
+/*
+ *  Libio Internal Information
+ *
+ *  COPYRIGHT (c) 1989-1999.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.OARcorp.com/rtems/license.html.
+ *
+ *  $Id$
+ */
+
+#ifndef __rtems_userenv_h
+#define __rtems_userenv_h
+
+#include <rtems.h>
+#include <rtems/fs.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ *  External structures
+ */
+#if !defined(LOGIN_NAME_MAX)
+#if defined(__linux__)
+#define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
+#else
+#error "don't know how to set LOGIN_NAME_MAX"
+#endif
+#endif
+
+typedef struct {
+ rtems_id                         task_id;	
+ rtems_filesystem_location_info_t current_directory;
+ rtems_filesystem_location_info_t root_directory;
+ /* Default mode for all files. */
+ mode_t                           umask;
+ nlink_t                          link_counts;
+ /* _POSIX_types */
+ uid_t                            uid;
+ gid_t                            gid;
+ uid_t                            euid;
+ gid_t                            egid;
+ char      login_buffer[LOGIN_NAME_MAX];
+
+ pid_t                            pgrp; /* process group id */
+} rtems_user_env_t;
+
+extern rtems_user_env_t * rtems_current_user_env; 
+extern rtems_user_env_t   rtems_global_user_env; 
+
+#define rtems_filesystem_current     (rtems_current_user_env->current_directory)
+#define rtems_filesystem_root        (rtems_current_user_env->root_directory)
+#define rtems_filesystem_link_counts (rtems_current_user_env->link_counts)
+#define rtems_filesystem_umask       (rtems_current_user_env->umask)
+
+#define _POSIX_types_Uid             (rtems_current_user_env->uid)
+#define _POSIX_types_Gid             (rtems_current_user_env->gid)
+#define _POSIX_types_Euid            (rtems_current_user_env->euid)
+#define _POSIX_types_Egid            (rtems_current_user_env->egid)
+#define _POSIX_types_Getlogin_buffer (rtems_current_user_env->login_buffer)
+
+
+/*
+ *  Instantiate a private copy of the per user information for the calling task.
+ */
+
+rtems_status_code rtems_libio_set_private_env(void);
+rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
+	
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
Index: c/src/exec/wrapup/Makefile.am
===================================================================
--- c/src/exec/wrapup/Makefile.am	(revision b8caf37ea31d11f121f26c0b1d9a41f0326ba82f)
+++ c/src/exec/wrapup/Makefile.am	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
@@ -28,6 +28,4 @@
     $(POSIX_OBJS) $(ITRON_OBJS)
 
-SIZE_RTEMS = $(SHELL) $(PROJECT_TOPdir)/tools/cpu/generic/size_rtems
-
 $(LIB): ${OBJS}
 	$(make-library)
@@ -38,4 +36,8 @@
 	$(INSTALL_DATA) $< $@
 
+install-hook: $(LIB)
+	@$(mkinstalldirs) $(libdir)
+	$(INSTALL_DATA) $(LIB) $(libdir)
+
 all-local: ${ARCH} $(TMPINSTALL_FILES)
 
Index: cpukit/ChangeLog
===================================================================
--- cpukit/ChangeLog	(revision b8caf37ea31d11f121f26c0b1d9a41f0326ba82f)
+++ cpukit/ChangeLog	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
@@ -1,2 +1,9 @@
+2002-01-07	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+	* wrapup/Makefile.am: Add install-hook. 
+	Remove SIZE_RTEMS.
+	* include/rtems/fs.h: New, extracted from libio_.h.
+	* include/rtems/userenv.h: New. extracted from libio_.h.
+
 2002-02-05	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
 
Index: cpukit/include/rtems/fs.h
===================================================================
--- cpukit/include/rtems/fs.h	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
+++ cpukit/include/rtems/fs.h	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
@@ -0,0 +1,59 @@
+/*
+ *  Some basic filesystem types
+ *
+ *  COPYRIGHT (c) 1989-1999.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.OARcorp.com/rtems/license.html.
+ *
+ *  $Id$
+ */
+
+#ifndef __rtems_fstypes_h
+#define __rtems_fstypes_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ *  File descriptor Table Information
+ */
+
+/* Forward declarations */
+
+/* FIXME: shouldn't this better not be here? */ 
+typedef struct rtems_libio_tt rtems_libio_t;
+
+typedef struct rtems_filesystem_location_info_tt
+    rtems_filesystem_location_info_t;
+
+struct rtems_filesystem_mount_table_entry_tt;
+typedef struct rtems_filesystem_mount_table_entry_tt
+    rtems_filesystem_mount_table_entry_t;
+
+typedef struct _rtems_filesystem_file_handlers_r 
+    rtems_filesystem_file_handlers_r;
+typedef struct _rtems_filesystem_operations_table 
+    rtems_filesystem_operations_table;
+
+/*
+ * Structure used to determine a location/filesystem in the tree.
+ */
+  
+struct rtems_filesystem_location_info_tt
+{
+   void                                 *node_access;
+   rtems_filesystem_file_handlers_r     *handlers;
+   rtems_filesystem_operations_table	*ops;
+   rtems_filesystem_mount_table_entry_t *mt_entry;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
Index: cpukit/include/rtems/userenv.h
===================================================================
--- cpukit/include/rtems/userenv.h	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
+++ cpukit/include/rtems/userenv.h	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
@@ -0,0 +1,79 @@
+/*
+ *  Libio Internal Information
+ *
+ *  COPYRIGHT (c) 1989-1999.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.OARcorp.com/rtems/license.html.
+ *
+ *  $Id$
+ */
+
+#ifndef __rtems_userenv_h
+#define __rtems_userenv_h
+
+#include <rtems.h>
+#include <rtems/fs.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ *  External structures
+ */
+#if !defined(LOGIN_NAME_MAX)
+#if defined(__linux__)
+#define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
+#else
+#error "don't know how to set LOGIN_NAME_MAX"
+#endif
+#endif
+
+typedef struct {
+ rtems_id                         task_id;	
+ rtems_filesystem_location_info_t current_directory;
+ rtems_filesystem_location_info_t root_directory;
+ /* Default mode for all files. */
+ mode_t                           umask;
+ nlink_t                          link_counts;
+ /* _POSIX_types */
+ uid_t                            uid;
+ gid_t                            gid;
+ uid_t                            euid;
+ gid_t                            egid;
+ char      login_buffer[LOGIN_NAME_MAX];
+
+ pid_t                            pgrp; /* process group id */
+} rtems_user_env_t;
+
+extern rtems_user_env_t * rtems_current_user_env; 
+extern rtems_user_env_t   rtems_global_user_env; 
+
+#define rtems_filesystem_current     (rtems_current_user_env->current_directory)
+#define rtems_filesystem_root        (rtems_current_user_env->root_directory)
+#define rtems_filesystem_link_counts (rtems_current_user_env->link_counts)
+#define rtems_filesystem_umask       (rtems_current_user_env->umask)
+
+#define _POSIX_types_Uid             (rtems_current_user_env->uid)
+#define _POSIX_types_Gid             (rtems_current_user_env->gid)
+#define _POSIX_types_Euid            (rtems_current_user_env->euid)
+#define _POSIX_types_Egid            (rtems_current_user_env->egid)
+#define _POSIX_types_Getlogin_buffer (rtems_current_user_env->login_buffer)
+
+
+/*
+ *  Instantiate a private copy of the per user information for the calling task.
+ */
+
+rtems_status_code rtems_libio_set_private_env(void);
+rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
+	
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
Index: cpukit/wrapup/Makefile.am
===================================================================
--- cpukit/wrapup/Makefile.am	(revision b8caf37ea31d11f121f26c0b1d9a41f0326ba82f)
+++ cpukit/wrapup/Makefile.am	(revision dd2906e7e339c5968d979446796c5f99ad550d80)
@@ -28,6 +28,4 @@
     $(POSIX_OBJS) $(ITRON_OBJS)
 
-SIZE_RTEMS = $(SHELL) $(PROJECT_TOPdir)/tools/cpu/generic/size_rtems
-
 $(LIB): ${OBJS}
 	$(make-library)
@@ -38,4 +36,8 @@
 	$(INSTALL_DATA) $< $@
 
+install-hook: $(LIB)
+	@$(mkinstalldirs) $(libdir)
+	$(INSTALL_DATA) $(LIB) $(libdir)
+
 all-local: ${ARCH} $(TMPINSTALL_FILES)
 
