diff options
-rw-r--r-- | ChangeLog | 47 | ||||
-rw-r--r-- | PROJECTS | 14 | ||||
-rwxr-xr-x | configure | 17 | ||||
-rw-r--r-- | posix/unistd.h | 6 | ||||
-rw-r--r-- | shadow.h | 1 | ||||
-rw-r--r-- | socket/sys/socket.h | 8 | ||||
-rw-r--r-- | sysdeps/alpha/elf/start.S | 4 | ||||
-rw-r--r-- | sysdeps/posix/ttyname.c | 3 | ||||
-rw-r--r-- | sysdeps/posix/ttyname_r.c | 3 | ||||
-rw-r--r-- | sysdeps/unix/getlogin.c | 36 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/ioperm.c | 46 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/netinet/in.h | 14 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sys/procfs.h | 1 |
14 files changed, 141 insertions, 61 deletions
@@ -1,3 +1,50 @@ +Mon Aug 12 03:31:58 1996 Ulrich Drepper <drepper@cygnus.com> + + * nss/nsswitch.c (__nss_configure_lookup): New function. + Allows to specify services. + * nss/XXX-lookup.h: Rename database variable and make global. + * nss/databases.def: New file. Real names of all databases. + + * nss/nss.h: New file. Contains declaration useful for users + and service developers. + * nss/nsswitch.h: Move some declarations to nss/nss.h. + * nss.h: New file. Wrapper around nss/nss.h. + + * nss/Makefile (headers): Add nss.h. + (distributes): Add databases.h. + +Sun Aug 11 16:19:42 1996 Ulrich Drepper <drepper@cygnus.com> + + Help the poor people with fast machines by making sure only + one `ar' commands works on the library. + * autolock.sh: New file. Written by Tom Tromey. + * Makerules (do-ar): Call autolock.sh shell script instead of + directly using `ar'. + * config.make.in: Make configuration variable AUTOLOCK which + gets initialized by configure. + * configure.in: Define variable AUTOLOCK to point to autolock.sh + script and mark it to substitute. + + * string/Makefile: Add -fno-builtin for tst-strlen.c, too. + + * elf/dl-lookup.c (_dl_lookup_symbol): Allow self-referencing. + Patch by David Mosberger-Tang. + +Sun Aug 11 01:12:38 1996 Richard Henderson <rth@tamu.edu> + + * sysdeps/alpha/dl-machine.h (elf_alpha_fix_plt): Optimize LD_BIND_NOW + startup by moving Icache flush from here ... + (ELF_MACHINE_RUNTIME_TRAMPOLINE): ... to here. + (ELF_MACHINE_USER_ADDRESS_MASK): Delete; it is unused. + + * sysdeps/alpha/divrem.h: Update comment to reflect the actual + calling conventions. The code is already correct. + +Sun Aug 11 01:06:42 1996 Richard Henderson <rth@tamu.edu> + + * string/Makefile: Compile tester with -fno-builtin as we want to + test our implementations, not gcc's. + Sat Aug 10 13:17:27 1996 David Mosberger-Tang <davidm@azstarnet.com> * shadow.h: New file. @@ -77,6 +77,8 @@ contact <bug-glibc@prep.ai.mit.edu> Usenix Winter '92, pp. 419--428 or just ask. Currently mostly i?86 optimized versions exist. + Alpha versions are on their way, so please ask before working + on this. [ 8] Write nftw() function. Perhaps it might be good to reimplement the @@ -102,14 +104,10 @@ contact <bug-glibc@prep.ai.mit.edu> implementation c) will be extended with the current hooks and additional functions + Please contact bug-glibc@prep.ai.mit.edu before starting to avoid + duplicated work. -[12] Implement shadow password handling. There exist some but I don't - know of any falling under LGPL and where the author is willing to - contribute it to the FSF. - - -[13] Write access function for shadow, netmasks, bootparams, netgroup, - publickey, automount, aliases databases for nss_files and nss_db - module. +[12] Write access function for netmasks, bootparams, netgroup, publickey, + automount, aliases databases for nss_files and nss_db module. The functions should be embedded in the nss scheme. This is not hard and not all services must be supported at once. @@ -1273,6 +1273,8 @@ else fi fi +AUTOLOCK="`(cd $srcdir; pwd)`/autolock.sh" + echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6 if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then @@ -1302,7 +1304,7 @@ if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1306 "configure" +#line 1308 "configure" #include "confdefs.h" #define __need_size_t #define __need_wchar_t @@ -1318,7 +1320,7 @@ size_t size; wchar_t wchar; if (&size == NULL || &wchar == NULL) abort (); ; return 0; } EOF -if { (eval echo configure:1322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_friendly_stddef=yes else @@ -1425,7 +1427,7 @@ if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1429 "configure" +#line 1431 "configure" #include "confdefs.h" int main() { return 0; } @@ -1435,7 +1437,7 @@ asm (".section .init"); asm (".text"); ; return 0; } EOF -if { (eval echo configure:1439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_have_initfini=yes else @@ -1463,7 +1465,7 @@ if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1467 "configure" +#line 1469 "configure" #include "confdefs.h" asm ("_glibc_foobar:"); int main() { return 0; } @@ -1471,7 +1473,7 @@ int t() { glibc_foobar (); ; return 0; } EOF -if { (eval echo configure:1475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* libc_cv_asm_underscores=yes else @@ -1563,7 +1565,7 @@ _start () {} EOF if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles -Wl,--no-whole-archive - -o conftest conftest.c'; { (eval echo configure:1567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c'; { (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_ld_no_whole_archive=yes else libc_cv_ld_no_whole_archive=no @@ -1837,6 +1839,7 @@ s%@BUILD_CC@%$BUILD_CC%g s%@CPP@%$CPP%g s%@AR@%$AR%g s%@RANLIB@%$RANLIB%g +s%@AUTOLOCK@%$AUTOLOCK%g s%@libc_cv_have_initfini@%$libc_cv_have_initfini%g s%@libc_cv_ld_no_whole_archive@%$libc_cv_ld_no_whole_archive%g s%@uname_sysname@%$uname_sysname%g diff --git a/posix/unistd.h b/posix/unistd.h index ab40f24..526832a 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -333,6 +333,12 @@ extern int execvp __P ((__const char *__file, char *__const __argv[])); extern int execlp __P ((__const char *__file, ...)); +#ifdef __USE_MISC +/* Add INC to priority of the current process. */ +extern int nice __P ((int __inc)); +#endif + + /* Terminate program execution with the low-order 8 bits of STATUS. */ extern void _exit __P ((int __status)) __attribute__ ((__noreturn__)); diff --git a/shadow.h b/shadow.h new file mode 100644 index 0000000..4848197 --- /dev/null +++ b/shadow.h @@ -0,0 +1 @@ +#include <shadow/shadow.h> diff --git a/socket/sys/socket.h b/socket/sys/socket.h index 3124de0..f445b4c 100644 --- a/socket/sys/socket.h +++ b/socket/sys/socket.h @@ -45,9 +45,11 @@ struct osockaddr /* This is the type we use for generic socket address arguments. - With GCC 2.7 and later, the funky union causes redeclarations or uses with - any of the listed types to be allowed without complaint. */ -#if (!defined (__GNUC__) || __GNUC__ < 2 || \ + With GCC 2.7 and later, the funky union causes redeclarations or + uses with any of the listed types to be allowed without complaint. + G++ 2.7 does not support transparent unions so there we want the + old-style declaration, too. */ +#if (!defined (__GNUC__) || __GNUC__ < 2 || defined(__cplusplus) || \ (__GNUC__ == 2 && __GNUC_MINOR__ < 7)) #define __SOCKADDR_ARG struct sockaddr * #define __CONST_SOCKADDR_ARG __const struct sockaddr * diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S index c534d69..596cea6 100644 --- a/sysdeps/alpha/elf/start.S +++ b/sysdeps/alpha/elf/start.S @@ -20,9 +20,11 @@ Cambridge, MA 02139, USA. */ #include <sysdep.h> .text - .globl __start + .globl _start /* what ELF wants */ + .globl __start /* for backwards (ECOFF) comatibility */ .align 3 .ent __start, 0 +_start: __start: .frame fp, 0, zero mov zero, fp diff --git a/sysdeps/posix/ttyname.c b/sysdeps/posix/ttyname.c index b0650b3..7c7ed24 100644 --- a/sysdeps/posix/ttyname.c +++ b/sysdeps/posix/ttyname.c @@ -44,6 +44,9 @@ DEFUN(ttyname, (fd), int fd) struct dirent *d; int save = errno; + if (!__isatty (fd)) + return NULL; + if (fstat (fd, &st) < 0) return NULL; mydev = st.st_dev; diff --git a/sysdeps/posix/ttyname_r.c b/sysdeps/posix/ttyname_r.c index a05dbd5..e6172f1 100644 --- a/sysdeps/posix/ttyname_r.c +++ b/sysdeps/posix/ttyname_r.c @@ -54,6 +54,9 @@ __ttyname_r (fd, buf, buflen) return -1; } + if (!__isatty (fd)) + return -1; + if (fstat (fd, &st) < 0) return -1; mydev = st.st_dev; diff --git a/sysdeps/unix/getlogin.c b/sysdeps/unix/getlogin.c index 5a8ad96..e23ffa4 100644 --- a/sysdeps/unix/getlogin.c +++ b/sysdeps/unix/getlogin.c @@ -34,25 +34,21 @@ getlogin (void) char tty_pathname[2 + 2 * NAME_MAX]; char *real_tty_path = tty_pathname; char *result = NULL; - static struct utmp_data utmp_data = { ut_fd: -1 }; + struct utmp_data utmp_data = { ut_fd: -1 }; + static char name[UT_NAMESIZE + 1]; struct utmp *ut, line; - { - int err = 0; - int d = __open ("/dev/tty", 0); - if (d < 0) - return NULL; - - if (__ttyname_r (d, real_tty_path, sizeof (tty_pathname)) < 0) - err = errno; - (void) close (d); - - if (err != 0) - { - errno = err; - return NULL; - } - } + /* Get name of tty connected to fd 0. Return NULL if not a tty or + if fd 0 isn't open. Note that a lot of documentation says that + getlogin() is based on the controlling terminal---what they + really mean is "the terminal connected to standard input". The + getlogin() implementation of DEC Unix, SunOS, Solaris, HP-UX all + return NULL if fd 0 has been closed, so this is the compatible + thing to do. Note that ttyname(open("/dev/tty")) on those + systems returns /dev/tty, so that is not a possible solution for + getlogin(). */ + if (__ttyname_r (0, real_tty_path, sizeof (tty_pathname)) < 0) + return NULL; real_tty_path += 5; /* Remove "/dev/". */ @@ -66,7 +62,11 @@ getlogin (void) result = NULL; } else - result = ut->ut_line; + { + strncpy (name, ut->ut_user, UT_NAMESIZE); + name[UT_NAMESIZE] = '\0'; + result = name; + } __endutent_r (&utmp_data); diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 5f6b6b0..7d83718 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -3,7 +3,7 @@ sysdep_routines += sysctl clone sysdep_headers += sys/mount.h sys/sysinfo.h sys/acct.h sys/sysctl.h \ sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \ - sys/user.h syscall-list.h sys/sysmacros.h + sys/user.h syscall-list.h sys/sysmacros.h sys/procfs.h # Generate the list of SYS_* macros for the system calls (__NR_* macros). $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/syscall.h diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 56331cb..d24eabe 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -59,14 +59,16 @@ I/O address space that's 512MB large!). */ * so the following defines apply to LCA as well. */ #define APECS_IO_BASE (0xfffffc01c0000000UL) +#define APECS_SPARSE_MEM (0xfffffc0200000000UL) #define APECS_DENSE_MEM (0xfffffc0300000000UL) -#define ALCOR_IO_BASE (0xfffffc8580000000UL) -#define ALCOR_DENSE_MEM (0xfffffc8600000000UL) +#define CIA_IO_BASE (0xfffffc8580000000UL) +#define CIA_SPARSE_MEM (0xfffffc8000000000UL) +#define CIA_DENSE_MEM (0xfffffc8600000000UL) enum { - IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_ALCOR = 2 + IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_CIA = 2 } iosys_t; struct ioswtch { @@ -83,18 +85,19 @@ static struct platform { const char *name; int io_sys; unsigned long bus_memory_base; + unsigned long sparse_bus_memory_base; } platform[] = { - {"Alcor", IOSYS_ALCOR, ALCOR_DENSE_MEM}, - {"Avanti", IOSYS_APECS, APECS_DENSE_MEM}, - {"Cabriolet", IOSYS_APECS, APECS_DENSE_MEM}, - {"EB164", IOSYS_ALCOR, ALCOR_DENSE_MEM}, - {"EB64+", IOSYS_APECS, APECS_DENSE_MEM}, - {"EB66", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ - {"EB66P", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ - {"Jensen", IOSYS_JENSEN, JENSEN_MEM}, - {"Mikasa", IOSYS_APECS, APECS_DENSE_MEM}, - {"Mustang", IOSYS_APECS, APECS_DENSE_MEM}, - {"Noname", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */ + {"Alcor", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM}, + {"Avanti", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Cabriolet", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"EB164", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM}, + {"EB64+", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"EB66", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"EB66P", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Jensen", IOSYS_JENSEN, JENSEN_MEM, JENSEN_MEM}, + {"Mikasa", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Mustang", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, + {"Noname", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM}, }; @@ -109,6 +112,7 @@ static struct { } io; static unsigned long bus_memory_base = -1; +static unsigned long sparse_bus_memory_base = -1; extern void __sethae (unsigned long); /* we can't use asm/io.h */ @@ -256,7 +260,7 @@ DCL_IN(jensen, inb, JENSEN) DCL_IN(jensen, inw, JENSEN) DCL_IN(jensen, inl, JENSEN) -/* The APECS functions are also used for ALCOR since they are +/* The APECS functions are also used for CIA since they are identical. */ DCL_SETHAE(apecs, APECS) @@ -332,6 +336,7 @@ init_iosys (void) if (strcmp (platform[i].name, systype) == 0) { bus_memory_base = platform[i].bus_memory_base; + sparse_bus_memory_base = platform[i].sparse_bus_memory_base; io.sys = platform[i].io_sys; if (io.sys == IOSYS_JENSEN) io.swp = &ioswtch[0]; @@ -382,7 +387,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on) { case IOSYS_JENSEN: base = JENSEN_IO_BASE; break; case IOSYS_APECS: base = APECS_IO_BASE; break; - case IOSYS_ALCOR: base = ALCOR_IO_BASE; break; + case IOSYS_CIA: base = CIA_IO_BASE; break; default: errno = ENODEV; return -1; @@ -498,6 +503,14 @@ _bus_base(void) return bus_memory_base; } +unsigned long +_bus_base_sparse(void) +{ + if (!io.swp && init_iosys () < 0) + return -1; + return sparse_bus_memory_base; +} + weak_alias (_sethae, sethae); weak_alias (_ioperm, ioperm); weak_alias (_iopl, iopl); @@ -508,3 +521,4 @@ weak_alias (_outb, outb); weak_alias (_outw, outw); weak_alias (_outl, outl); weak_alias (_bus_base, bus_base); +weak_alias (_bus_base_sparse, bus_base_sparse); diff --git a/sysdeps/unix/sysv/linux/netinet/in.h b/sysdeps/unix/sysv/linux/netinet/in.h index 9ba2bdd..9c128a1 100644 --- a/sysdeps/unix/sysv/linux/netinet/in.h +++ b/sysdeps/unix/sysv/linux/netinet/in.h @@ -81,6 +81,8 @@ struct ip_opts char ip_opts[40]; /* Actually variable in size. */ }; +__BEGIN_DECLS + /* Functions to convert between host and network byte order. */ extern unsigned long int ntohl __P ((unsigned long int)); @@ -88,6 +90,11 @@ extern unsigned short int ntohs __P ((unsigned short int)); extern unsigned long int htonl __P ((unsigned long int)); extern unsigned short int htons __P ((unsigned short int)); +/* Bind socket FD to a privileged IP address SIN. */ +extern int bindresvport __P ((int __fd, struct sockaddr_in * __sin)); + +__END_DECLS + #include <endian.h> #if __BYTE_ORDER == __BIG_ENDIAN @@ -103,11 +110,4 @@ extern unsigned short int htons __P ((unsigned short int)); #define htons(x) (x) #endif -__BEGIN_DECLS - -/* Bind socket FD to a privileged IP address SIN. */ -extern int bindresvport __P((int __fd, struct sockaddr_in * __sin)); - -__END_DECLS - #endif /* netinet/in.h */ diff --git a/sysdeps/unix/sysv/linux/sys/procfs.h b/sysdeps/unix/sysv/linux/sys/procfs.h new file mode 100644 index 0000000..9c1079d --- /dev/null +++ b/sysdeps/unix/sysv/linux/sys/procfs.h @@ -0,0 +1 @@ +#include <linux/elfcore.h> |