Changeset 933388ae in rtems
- Timestamp:
- 04/22/99 21:13:23 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 16a384cf
- Parents:
- 3599c5e
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libcsupport/src/stat.c
r3599c5e r933388ae 1 1 /* 2 2 * stat() - POSIX 1003.1b 5.6.2 - Get File Status 3 * 4 * Reused from lstat(). 3 5 * 4 6 * COPYRIGHT (c) 1989-1998. … … 12 14 * $Id$ 13 15 */ 16 17 /* 18 * lstat() and stat() share the same implementation with a minor 19 * difference on how links are evaluated. 20 */ 21 22 #ifndef _STAT_NAME 23 #define _STAT_NAME stat 24 #define _STAT_R_NAME _stat_r 25 #define _STAT_FOLLOW_LINKS TRUE 26 #endif 27 14 28 15 29 #include <rtems.h> … … 26 40 #include "libio_.h" 27 41 28 int stat(42 int _STAT_NAME( 29 43 const char *path, 30 44 struct stat *buf … … 41 55 set_errno_and_return_minus_one( EFAULT ); 42 56 43 status = rtems_filesystem_evaluate_path( path, 0, &loc, TRUE);57 status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 44 58 if ( status != 0 ) 45 59 return -1; … … 60 74 61 75 /* 62 * _stat_r 76 * _stat_r, _lstat_r 63 77 * 64 * This is the Newlib dependent reentrant version of stat() .78 * This is the Newlib dependent reentrant version of stat() and lstat(). 65 79 */ 66 80 … … 69 83 #include <reent.h> 70 84 71 int _ stat_r(85 int _STAT_R_NAME( 72 86 struct _reent *ptr, 73 87 const char *path, … … 75 89 ) 76 90 { 77 return stat( path, buf );91 return _STAT_NAME( path, buf ); 78 92 } 79 93 #endif -
c/src/lib/libc/Makefile.in
r3599c5e r933388ae 48 48 LIBC_GLUE_PIECES=\ 49 49 __gettod __times \ 50 truncate access stat pathconf \50 truncate access stat lstat pathconf \ 51 51 newlibc no_libc 52 52 -
c/src/lib/libc/stat.c
r3599c5e r933388ae 1 1 /* 2 2 * stat() - POSIX 1003.1b 5.6.2 - Get File Status 3 * 4 * Reused from lstat(). 3 5 * 4 6 * COPYRIGHT (c) 1989-1998. … … 12 14 * $Id$ 13 15 */ 16 17 /* 18 * lstat() and stat() share the same implementation with a minor 19 * difference on how links are evaluated. 20 */ 21 22 #ifndef _STAT_NAME 23 #define _STAT_NAME stat 24 #define _STAT_R_NAME _stat_r 25 #define _STAT_FOLLOW_LINKS TRUE 26 #endif 27 14 28 15 29 #include <rtems.h> … … 26 40 #include "libio_.h" 27 41 28 int stat(42 int _STAT_NAME( 29 43 const char *path, 30 44 struct stat *buf … … 41 55 set_errno_and_return_minus_one( EFAULT ); 42 56 43 status = rtems_filesystem_evaluate_path( path, 0, &loc, TRUE);57 status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 44 58 if ( status != 0 ) 45 59 return -1; … … 60 74 61 75 /* 62 * _stat_r 76 * _stat_r, _lstat_r 63 77 * 64 * This is the Newlib dependent reentrant version of stat() .78 * This is the Newlib dependent reentrant version of stat() and lstat(). 65 79 */ 66 80 … … 69 83 #include <reent.h> 70 84 71 int _ stat_r(85 int _STAT_R_NAME( 72 86 struct _reent *ptr, 73 87 const char *path, … … 75 89 ) 76 90 { 77 return stat( path, buf );91 return _STAT_NAME( path, buf ); 78 92 } 79 93 #endif -
cpukit/libcsupport/src/stat.c
r3599c5e r933388ae 1 1 /* 2 2 * stat() - POSIX 1003.1b 5.6.2 - Get File Status 3 * 4 * Reused from lstat(). 3 5 * 4 6 * COPYRIGHT (c) 1989-1998. … … 12 14 * $Id$ 13 15 */ 16 17 /* 18 * lstat() and stat() share the same implementation with a minor 19 * difference on how links are evaluated. 20 */ 21 22 #ifndef _STAT_NAME 23 #define _STAT_NAME stat 24 #define _STAT_R_NAME _stat_r 25 #define _STAT_FOLLOW_LINKS TRUE 26 #endif 27 14 28 15 29 #include <rtems.h> … … 26 40 #include "libio_.h" 27 41 28 int stat(42 int _STAT_NAME( 29 43 const char *path, 30 44 struct stat *buf … … 41 55 set_errno_and_return_minus_one( EFAULT ); 42 56 43 status = rtems_filesystem_evaluate_path( path, 0, &loc, TRUE);57 status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 44 58 if ( status != 0 ) 45 59 return -1; … … 60 74 61 75 /* 62 * _stat_r 76 * _stat_r, _lstat_r 63 77 * 64 * This is the Newlib dependent reentrant version of stat() .78 * This is the Newlib dependent reentrant version of stat() and lstat(). 65 79 */ 66 80 … … 69 83 #include <reent.h> 70 84 71 int _ stat_r(85 int _STAT_R_NAME( 72 86 struct _reent *ptr, 73 87 const char *path, … … 75 89 ) 76 90 { 77 return stat( path, buf );91 return _STAT_NAME( path, buf ); 78 92 } 79 93 #endif
Note: See TracChangeset
for help on using the changeset viewer.