This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add missing pathconf flags


Hi,

FYI, I've applied the below patch which just adds the missing (f)pathconf
flags _PC_FILESIZEBITS, _PC_2_SYMLINKS and _PC_SYMLINK_MAX as described
here: http://www.opengroup.org/onlinepubs/009695399/functions/pathconf.html

The patch also enables the _SC_STREAM_MAX definition for Cygwin.


Corinna

	* libc/include/sys/unistd.h (_SC_STREAM_MAX): Define on Cygwin.
        (_PC_FILESIZEBITS): Add definition.
        (_PC_2_SYMLINKS): Ditto.
        (_PC_SYMLINK_MAX): Ditto.

Index: sys/unistd.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/unistd.h,v
retrieving revision 1.56
diff -u -p -r1.56 unistd.h
--- sys/unistd.h        3 Nov 2005 16:52:15 -0000       1.56
+++ sys/unistd.h        7 Nov 2006 15:27:59 -0000
@@ -303,8 +303,10 @@ int     _EXFUN(symlink, (const char *__n
 #define _SC_LOGIN_NAME_MAX               52
 #define _SC_THREAD_DESTRUCTOR_ITERATIONS 53
 
-#if !defined(__CYGWIN__) && !defined(__rtems__)
+#if !defined(__rtems__)
 #define _SC_STREAM_MAX                 100
+#endif
+#if !defined(__CYGWIN__) && !defined(__rtems__)
 #define _SC_PRIORITY_SCHEDULING                101
 #endif
   
@@ -320,6 +322,9 @@ int     _EXFUN(symlink, (const char *__n
 # define       _PC_ASYNC_IO            9
 # define       _PC_PRIO_IO            10
 # define       _PC_SYNC_IO            11
+# define       _PC_FILESIZEBITS       12
+# define       _PC_2_SYMLINKS         13
+# define       _PC_SYMLINK_MAX        14
 #ifdef __CYGWIN__
 /* Ask for POSIX permission bits support. */
 # define       _PC_POSIX_PERMISSIONS   90

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]