Set $inhibit_glue.

This commit is contained in:
Roland McGrath 1996-01-29 19:30:15 +00:00
parent 429ed67ba1
commit b86199fb60
11 changed files with 70 additions and 35 deletions

View File

@ -42,7 +42,7 @@ configure: configure.in; $(autoconf-it)
include Makeconfig
ifndef avoid-generated
include $(objpfx)sysd-dirs
-include $(objpfx)sysd-dirs
define \n

View File

@ -419,8 +419,11 @@ for dir in $sysnames; do
. $sysdep_dir/$dir/configure
fi
if test -z "$uname"; then
{ test -r $sysdep_dir/$dir/uname.c || test -r $sysdep_dir/$dir/uname.S; } \
&& uname=$dir
if test -r $sysdep_dir/$dir/uname.c ||
test -r $sysdep_dir/$dir/uname.S ||
{ test -r $sysdep_dir/$dir/syscalls.list &&
grep '^uname[ ]' $sysdep_dir/$dir/syscalls.list >/dev/null; }; then
uname=$dir
fi
done

View File

@ -388,18 +388,30 @@ tmp()
{
sigset_t set, oset;
int fd;
char *envtmp;
char path[MAXPATHLEN];
const char *envtmp;
char *path;
static const char fmt[] = "%s/bt.XXXXXX";
size_t n;
envtmp = getenv("TMPDIR");
(void)snprintf(path,
sizeof(path), "%s/bt.XXXXXX", envtmp ? envtmp : "/tmp");
if (!envtmp)
envtmp = "/tmp";
n = strlen (envtmp) + sizeof fmt;
#ifdef __GNUC__
path = __builtin_alloca(n);
#else
path = malloc(n);
#endif
(void)snprintf(path, n, fmt, envtmp ? envtmp : "/tmp");
(void)sigfillset(&set);
(void)sigprocmask(SIG_BLOCK, &set, &oset);
if ((fd = mkstemp(path)) != -1)
(void)unlink(path);
(void)sigprocmask(SIG_SETMASK, &oset, NULL);
#ifndef __GNUC__
free(path);
#endif
return(fd);
}

View File

@ -505,7 +505,7 @@ flush_meta(hashp)
else
if (wsize != sizeof(HASHHDR)) {
errno = EFTYPE;
hashp->errno = errno;
hashp->errnum = errno;
return (-1);
}
for (i = 0; i < NCACHED; i++)
@ -536,7 +536,7 @@ hash_get(dbp, key, data, flag)
hashp = (HTAB *)dbp->internal;
if (flag) {
hashp->errno = errno = EINVAL;
hashp->errnum = errno = EINVAL;
return (ERROR);
}
return (hash_access(hashp, HASH_GET, (DBT *)key, data));
@ -553,11 +553,11 @@ hash_put(dbp, key, data, flag)
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_NOOVERWRITE) {
hashp->errno = errno = EINVAL;
hashp->errnum = errno = EINVAL;
return (ERROR);
}
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
hashp->errno = errno = EPERM;
hashp->errnum = errno = EPERM;
return (ERROR);
}
return (hash_access(hashp, flag == R_NOOVERWRITE ?
@ -574,11 +574,11 @@ hash_delete(dbp, key, flag)
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_CURSOR) {
hashp->errno = errno = EINVAL;
hashp->errnum = errno = EINVAL;
return (ERROR);
}
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
hashp->errno = errno = EPERM;
hashp->errnum = errno = EPERM;
return (ERROR);
}
return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL));
@ -729,7 +729,7 @@ hash_seq(dbp, key, data, flag)
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_FIRST && flag != R_NEXT) {
hashp->errno = errno = EINVAL;
hashp->errnum = errno = EINVAL;
return (ERROR);
}
#ifdef HASH_STATISTICS

View File

@ -103,7 +103,7 @@ typedef struct htab { /* Memory resident data structure */
BUFHEAD *cpage; /* Current page */
int cbucket; /* Current bucket */
int cndx; /* Index of next item on cpage */
int errno; /* Error Number -- for DBM
int errnum; /* Error Number -- for DBM
* compatability */
int new_file; /* Indicates if fd is backing store
* or no */

View File

@ -47,6 +47,7 @@ static char sccsid[] = "@(#)ndbm.c 8.4 (Berkeley) 7/21/94";
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ndbm.h>
#include "hash.h"
@ -61,8 +62,16 @@ dbm_open(file, flags, mode)
const char *file;
int flags, mode;
{
DBM *db;
HASHINFO info;
char path[MAXPATHLEN];
const size_t len = strlen(file) + sizeof (DBM_SUFFIX);
#ifdef __GNUC__
char path[len];
#else
char *path = malloc(len);
if (path == NULL)
return NULL;
#endif
info.bsize = 4096;
info.ffactor = 40;
@ -72,7 +81,11 @@ dbm_open(file, flags, mode)
info.lorder = 0;
(void)strcpy(path, file);
(void)strcat(path, DBM_SUFFIX);
return ((DBM *)__hash_open(path, flags, mode, &info, 0));
db = (DBM *)__hash_open(path, flags, mode, &info, 0);
#ifndef __GNUC__
free(path);
#endif
return db;
}
extern void
@ -180,7 +193,7 @@ dbm_error(db)
HTAB *hp;
hp = (HTAB *)db->internal;
return (hp->errno);
return (hp->errnum);
}
extern int
@ -190,7 +203,7 @@ dbm_clearerr(db)
HTAB *hp;
hp = (HTAB *)db->internal;
hp->errno = 0;
hp->errnum = 0;
return (0);
}

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@ -295,5 +295,8 @@ strtol (nptr, endptr, base)
}
#ifdef weak_symbol
weak_symbol (strtol)
/* We need this indirection when `strtol' is defined as a macro
for one of the other names. */
#define weak1(x) weak_symbol(x)
weak1 (strtol)
#endif

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -167,7 +167,7 @@ extern char *alloca ();
#endif
#endif
#ifndef STDC_HEADERS
#if !defined (STDC_HEADERS) && !defined (__GNU_LIBRARY__)
#undef size_t
#define size_t unsigned int
#endif

View File

@ -49,6 +49,7 @@ sys_fstat fxstat fstat 2 __syscall_fstat
sys_mknod xmknod mknod 3 __syscall_mknod
sys_stat xstat stat 2 __syscall_stat
umask - umask 1 __umask umask
uname - uname 1 uname
unlink - unlink 1 __unlink unlink
write - write 3 __write write
writev - writev 3 writev

View File

@ -1,3 +1,7 @@
# On Linux, the default is to use libio instead of stdio.
test $stdio = default && stdio=libio
# Don't bother trying to generate any glue code to be compatible with the
# existing system library, because we are the only system library.
inhibit_glue=yes

View File

@ -11,5 +11,4 @@ stime - stime 1 stime
time - time 1 time
times - times 1 __times times
ulimit - ulimit 2 ulimit
uname - uname 1 uname
utime - utime 2 utime