diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2013-10-18 08:30:29 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2013-10-18 08:30:29 +0000 |
commit | 05b637e340d536f7c0d3aba51659bef31d191668 (patch) | |
tree | 676a895aa69a4d72acdce63ac21729f43bc992ba /newlib | |
parent | 9240d3c82430948615ded9c8d2731ad4f1eaedf2 (diff) | |
download | cygnal-05b637e340d536f7c0d3aba51659bef31d191668.tar.gz cygnal-05b637e340d536f7c0d3aba51659bef31d191668.tar.bz2 cygnal-05b637e340d536f7c0d3aba51659bef31d191668.zip |
* libc/include/sys/unistd.h (MAXPATHLEN): Delete.
* libc/include/sys/param.h (MAXPATHLEN): Define.
* libc/sys/rtems/sys/param.h (MAXPATHLEN): Likewise.
* libc/unix/getcwd.c: Include <sys/param.h> for MAXPATHLEN.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 7 | ||||
-rw-r--r-- | newlib/libc/include/sys/param.h | 3 | ||||
-rw-r--r-- | newlib/libc/include/sys/unistd.h | 4 | ||||
-rw-r--r-- | newlib/libc/sys/rtems/sys/param.h | 2 | ||||
-rw-r--r-- | newlib/libc/unix/getcwd.c | 1 |
5 files changed, 11 insertions, 6 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 380d0c124..a101ffbdb 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,10 @@ +2013-10-18 Sebastian Huber <sebastian.huber@embedded-brains.de> + + * libc/include/sys/unistd.h (MAXPATHLEN): Delete. + * libc/include/sys/param.h (MAXPATHLEN): Define. + * libc/sys/rtems/sys/param.h (MAXPATHLEN): Likewise. + * libc/unix/getcwd.c: Include <sys/param.h> for MAXPATHLEN. + 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de> * libc/libc/sys/rtems/sys/param.h: Update some parameters to diff --git a/newlib/libc/include/sys/param.h b/newlib/libc/include/sys/param.h index 7e8762a65..ef203d3ec 100644 --- a/newlib/libc/include/sys/param.h +++ b/newlib/libc/include/sys/param.h @@ -6,6 +6,7 @@ # define _SYS_PARAM_H #include <sys/config.h> +#include <sys/syslimits.h> #include <machine/endian.h> #include <machine/param.h> @@ -19,6 +20,8 @@ # define PATHSIZE (1024) #endif +#define MAXPATHLEN PATH_MAX + #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MIN(a,b) ((a) < (b) ? (a) : (b)) diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index a5f66c0b7..f1aacfa77 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -500,10 +500,6 @@ int _EXFUN(unlinkat, (int, const char *, int)); #define _CS_V6_ENV _CS_V7_ENV #endif -#ifndef __CYGWIN__ -# define MAXPATHLEN 1024 -#endif - #ifdef __cplusplus } #endif diff --git a/newlib/libc/sys/rtems/sys/param.h b/newlib/libc/sys/rtems/sys/param.h index eac24e91c..808745f85 100644 --- a/newlib/libc/sys/rtems/sys/param.h +++ b/newlib/libc/sys/rtems/sys/param.h @@ -156,9 +156,7 @@ * It should be set high enough to allow all legitimate uses, but halt * infinite loops reasonably quickly. */ -#if !defined(__rtems__) #define MAXPATHLEN PATH_MAX -#endif #define MAXSYMLINKS 32 /* Bit map related macros. */ diff --git a/newlib/libc/unix/getcwd.c b/newlib/libc/unix/getcwd.c index b49a4b6e0..92f1b20fd 100644 --- a/newlib/libc/unix/getcwd.c +++ b/newlib/libc/unix/getcwd.c @@ -32,6 +32,7 @@ static char sccsid[] = "@(#)getcwd.c 5.11 (Berkeley) 2/24/91"; #endif /* LIBC_SCCS and not lint */ +#include <sys/param.h> #include <sys/stat.h> #include <errno.h> #include <dirent.h> |