diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2008-11-18 21:47:44 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2008-11-18 21:47:44 +0000 |
commit | fd450adfe7378555bc79b356caa28fe7e1875d35 (patch) | |
tree | 9192d8c7ca53fa990c5cdad610c4884c79e62748 /newlib/libc | |
parent | 57f69f200e473bbb545ebfbe3dc2bb82c7a7a128 (diff) | |
download | newlib-fd450adfe7378555bc79b356caa28fe7e1875d35.zip newlib-fd450adfe7378555bc79b356caa28fe7e1875d35.tar.gz newlib-fd450adfe7378555bc79b356caa28fe7e1875d35.tar.bz2 |
2008-11-18 Jeff Johnston <jjohnstn@redhat.com>
* libc/unix/basename.c: Add !_NO_BASENAME flag check so code can be
ignored if desired by a platform.
* libc/unix/dirname.c: Ditto except replace BASENAME with file name.
* libc/unix/getcwd.c: Ditto.
* libc/unix/getlogin.c: Ditto.
* libc/unix/getpass.c: Ditto.
* libc/unix/getpwent.c: Ditto.
* libc/unix/getut.c: Ditto.
* libc/unix/pread.c: Ditto.
* libc/unix/pwrite.c: Ditto.
* libc/unix/sigset.c: Ditto.
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/unix/basename.c | 3 | ||||
-rw-r--r-- | newlib/libc/unix/dirname.c | 4 | ||||
-rw-r--r-- | newlib/libc/unix/getcwd.c | 6 | ||||
-rw-r--r-- | newlib/libc/unix/getlogin.c | 3 | ||||
-rw-r--r-- | newlib/libc/unix/getpass.c | 4 | ||||
-rw-r--r-- | newlib/libc/unix/getpwent.c | 4 | ||||
-rw-r--r-- | newlib/libc/unix/getut.c | 4 | ||||
-rw-r--r-- | newlib/libc/unix/pread.c | 4 | ||||
-rw-r--r-- | newlib/libc/unix/pwrite.c | 4 | ||||
-rw-r--r-- | newlib/libc/unix/sigset.c | 3 |
10 files changed, 29 insertions, 10 deletions
diff --git a/newlib/libc/unix/basename.c b/newlib/libc/unix/basename.c index 703e532..3a9cc0c 100644 --- a/newlib/libc/unix/basename.c +++ b/newlib/libc/unix/basename.c @@ -1,3 +1,4 @@ +#ifndef _NO_BASENAME /* Copyright 2005 Shaun Jackman * Permission to use, copy, modify, and distribute this software * is freely granted, provided that this notice is preserved. @@ -23,3 +24,5 @@ _DEFUN (basename, (path), p--; return p + 1; } + +#endif /* !_NO_BASENAME */ diff --git a/newlib/libc/unix/dirname.c b/newlib/libc/unix/dirname.c index f026e30..164da7f 100644 --- a/newlib/libc/unix/dirname.c +++ b/newlib/libc/unix/dirname.c @@ -1,3 +1,5 @@ +#ifndef _NO_DIRNAME + /* Copyright 2005 Shaun Jackman * Permission to use, copy, modify, and distribute this software * is freely granted, provided that this notice is preserved. @@ -26,3 +28,5 @@ _DEFUN (dirname, (path), p == path ? "/" : (*p = '\0', path); } + +#endif /* !_NO_DIRNAME */ diff --git a/newlib/libc/unix/getcwd.c b/newlib/libc/unix/getcwd.c index f57e147..b49a4b6 100644 --- a/newlib/libc/unix/getcwd.c +++ b/newlib/libc/unix/getcwd.c @@ -1,3 +1,4 @@ +#ifndef _NO_GETCWD /* * Copyright (c) 1989, 1991 The Regents of the University of California. * All rights reserved. @@ -10,10 +11,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -263,3 +260,4 @@ err: } #endif /* _REENT_ONLY */ +#endif /* !_NO_GETCWD */ diff --git a/newlib/libc/unix/getlogin.c b/newlib/libc/unix/getlogin.c index ea4ca29..da4f47a 100644 --- a/newlib/libc/unix/getlogin.c +++ b/newlib/libc/unix/getlogin.c @@ -1,3 +1,5 @@ +#ifndef _NO_GETLOGIN + #include <string.h> #include <unistd.h> #include <sys/types.h> @@ -40,3 +42,4 @@ getlogin () close (utmp_fd); return 0; } +#endif /* !_NO_GETLOGIN */ diff --git a/newlib/libc/unix/getpass.c b/newlib/libc/unix/getpass.c index 69327ba..6bd1c44 100644 --- a/newlib/libc/unix/getpass.c +++ b/newlib/libc/unix/getpass.c @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. diff --git a/newlib/libc/unix/getpwent.c b/newlib/libc/unix/getpwent.c index 5390c68..0f13a20 100644 --- a/newlib/libc/unix/getpwent.c +++ b/newlib/libc/unix/getpwent.c @@ -1,3 +1,5 @@ +#ifndef _NO_GETPWENT + #include <stdio.h> #include <sys/types.h> #include <pwd.h> @@ -125,3 +127,5 @@ endpwent () if (passwd_fp != NULL) fclose (passwd_fp); } + +#endif /* !_NO_GETPWENT */ diff --git a/newlib/libc/unix/getut.c b/newlib/libc/unix/getut.c index 554ed3c..cf054cb 100644 --- a/newlib/libc/unix/getut.c +++ b/newlib/libc/unix/getut.c @@ -1,3 +1,5 @@ +#ifndef _NO_GETUT + #include <stdlib.h> #include <string.h> #include <fcntl.h> @@ -84,3 +86,5 @@ getutline (struct utmp *line) return 0; } + +#endif /* !_NO_GETUT */ diff --git a/newlib/libc/unix/pread.c b/newlib/libc/unix/pread.c index 7208754..770c3fc 100644 --- a/newlib/libc/unix/pread.c +++ b/newlib/libc/unix/pread.c @@ -1,3 +1,4 @@ +#ifndef _NO_PREAD /* FUNCTION <<pread>>---read a file from specified position @@ -88,4 +89,5 @@ _DEFUN (pread, (fd, buf, n, off), return _pread_r (_REENT, fd, buf, n, off); } -#endif +#endif /* !_REENT_ONLY */ +#endif /* !_NO_PREAD */ diff --git a/newlib/libc/unix/pwrite.c b/newlib/libc/unix/pwrite.c index 23979ac..9f2a898 100644 --- a/newlib/libc/unix/pwrite.c +++ b/newlib/libc/unix/pwrite.c @@ -1,3 +1,4 @@ +#ifndef _NO_PWRITE /* FUNCTION <<pwrite>>---write a file from specified position @@ -89,4 +90,5 @@ _DEFUN (pwrite, (fd, buf, n, off), return _pwrite_r (_REENT, fd, buf, n, off); } -#endif +#endif /* !_REENT_ONLY */ +#endif /* !_NO_PWRITE */ diff --git a/newlib/libc/unix/sigset.c b/newlib/libc/unix/sigset.c index 867fb94..1861349 100644 --- a/newlib/libc/unix/sigset.c +++ b/newlib/libc/unix/sigset.c @@ -1,3 +1,5 @@ +#ifndef _NO_SIGSET + #include <signal.h> #include <errno.h> @@ -62,3 +64,4 @@ sigismember (const sigset_t * set, int signo) } #endif /* SIG_SETMASK */ +#endif /* _NO_SIGSET */ |