This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: _POSIX_SOURCE
- From: "Shaun Jackman" <sjackman at gmail dot com>
- To: newlib at sources dot redhat dot com
- Date: Mon, 20 Mar 2006 16:01:58 -0700
- Subject: Re: _POSIX_SOURCE
- References: <7f45d93905040509086427eff1@mail.gmail.com> <7f45d9390603201308h2699a85cy4fe699801773d7a5@mail.gmail.com>
- Reply-to: "Shaun Jackman" <sjackman at gmail dot com>
On 3/20/06, Shaun Jackman <sjackman@gmail.com> wrote:
...
> Since lstat is in SUSv3, I suggest removing the test on _POSIX_SOURCE
...
My previous patch is no good. It uses a 64-bit declaration of lstat.
This patch is better.
Cheers,
Shaun
2006-03-20 Shaun Jackman <sjackman@gmail.com>
* libc/sys/linux/sys/stat.h (lstat): New declaration.
Index: ./libc/sys/linux/sys/stat.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/linux/sys/stat.h,v
retrieving revision 1.5
diff -u -r1.5 stat.h
--- ./libc/sys/linux/sys/stat.h 16 Dec 2005 19:11:10 -0000 1.5
+++ ./libc/sys/linux/sys/stat.h 20 Mar 2006 22:59:47 -0000
@@ -18,6 +18,7 @@
int _EXFUN(fstat,( int __fd, struct stat *__sbuf ));
+int _EXFUN(lstat,( const char *__path, struct stat *__sbuf ));
int _EXFUN(mkdir,( const char *_path, mode_t __mode ));
int _EXFUN(mkfifo,( const char *__path, mode_t __mode ));
int _EXFUN(stat,( const char *__path, struct stat *__sbuf ));
@@ -25,7 +26,6 @@
#ifndef _POSIX_SOURCE
int _EXFUN(fstat64,( int __fd, struct stat64 *__sbuf ));
-int _EXFUN(lstat,( const char *file_name, struct stat64 *buf));
int _EXFUN(lstat64,( const char *file_name, struct stat64 *buf));
int _EXFUN(stat64,( const char *__path, struct stat64 *__sbuf ));
#endif /* _POSIX_SOURCE */