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.
This commit is contained in:
Jeff Johnston 2008-11-18 21:47:44 +00:00
parent 57f69f200e
commit fd450adfe7
11 changed files with 43 additions and 10 deletions

View File

@ -1,3 +1,17 @@
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.
2008-11-18 Craig Howland <howland@LGSInnovations.com>
* libc/unix/ttyname.c: Add ttyname_r and change ttyname to use

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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.

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */