mirror of git://sourceware.org/git/glibc.git
2001-02-26 Paul Eggert <eggert@twinsun.com> Modify mkstemp.c and tempname.c so that they can be used by GNU applications on non-glibc platforms. * misc/mkstemp.c (__GT_FILE): Define to zero if not defined. * sysdeps/posix/tempname.c: Include <config.h> if HAVE_CONFIG_H. Include <stddef.h>, <stdint.h>, <string.h> only if STDC_HEADERS || _LIBC. Include <fcntl.h> only if HAVE_FCNTL_H || _LIBC. Include <unistd.h> only if HAVE_UNISTD_H || _LIBC. Include <sys/time.h> only if HAVE_SYS_TIME_H || _LIBC. (__set_errno): Define this macro if <errno.h> doesn't. (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE): Define these macros if <stdio.h> doesn't. (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR): Define these macros if <sys/stat.h> doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN. (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64, __xstat64): Define if not _LIBC. (struct_stat64): New macro. (direxists, __gen_tempname): Use it, to avoid a portability problem with Solaris 8. (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC). (__gen_tempname): Invoke gettimeofday only if HAVE_GETTIMEOFDAY || _LIBC; otherwise, fall back on plain "time". Use portable macros like S_IRUSR | S_IWUSR rather than nonportable octal values like 0600. |
||
|---|---|---|
| .. | ||
| bits | ||
| sys | ||
| .cvsignore | ||
| Makefile | ||
| Versions | ||
| ar.h | ||
| daemon.c | ||
| dirname.c | ||
| efgcvt.c | ||
| efgcvt_r.c | ||
| err.c | ||
| err.h | ||
| error.c | ||
| error.h | ||
| fstab.c | ||
| fstab.h | ||
| getpass.c | ||
| getttyent.c | ||
| getusershell.c | ||
| hsearch.c | ||
| hsearch_r.c | ||
| init-misc.c | ||
| insremque.c | ||
| libgen.h | ||
| lsearch.c | ||
| mkdtemp.c | ||
| mkstemp.c | ||
| mkstemp64.c | ||
| mktemp.c | ||
| mntent.c | ||
| mntent.h | ||
| mntent_r.c | ||
| qefgcvt.c | ||
| qefgcvt_r.c | ||
| regexp.c | ||
| regexp.h | ||
| search.h | ||
| sgtty.h | ||
| stab.h | ||
| syscall.h | ||
| sysexits.h | ||
| syslog.c | ||
| syslog.h | ||
| tsearch.c | ||
| tst-dirname.c | ||
| tst-efgcvt.c | ||
| tst-fdset.c | ||
| tst-mntent.c | ||
| tst-tsearch.c | ||
| ttyent.h | ||
| ttyslot.c | ||
| ustat.h | ||