about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog20
-rwxr-xr-xconfigure4
-rw-r--r--configure.in4
-rw-r--r--elf/elf.h47
-rw-r--r--linuxthreads/ChangeLog14
-rw-r--r--linuxthreads/Versions3
-rw-r--r--linuxthreads/sysdeps/pthread/bits/libc-lock.h4
-rw-r--r--linuxthreads/weaks.c26
-rw-r--r--nscd/dbg_log.c5
-rw-r--r--nscd/nscd.c30
-rw-r--r--sysdeps/generic/glob.c37
11 files changed, 123 insertions, 71 deletions
diff --git a/ChangeLog b/ChangeLog
index 9f9cdebd5f..7c11175214 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,28 @@
+1998-07-24  Ulrich Drepper  <drepper@cygnus.com>
+
+	* sysdeps/generic/glob.c (glob): Fix problems with handle tilde.
+	Reported by Brian Wellington <bwelling@anomaly.munge.com>.
+
+	* elf/elf.h: Really define Elf64_Verdef, Elf64_Verdaux, Elf64_Verneed,
+	and Elf64_Vernaux.
+
+1998-07-24  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+	* configure.in: Recognize pgcc as compiler.
+	Reported by sauron@angband.ee.ualberta.ca.
+
+1998-07-02  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>
+
+	* nscd/dbg_log.c: Make sure, that debug message is really written.
+	* nscd/nscd.c: Don't use daemon(), set signal handler after fork.
+
 1998-07-23  Ulrich Drepper  <drepper@cygnus.com>
 
 	* sysdeps/generic/glob.c: Fix two problems with GLOB_DOOFFS.
 	Reported by bwelling@anomaly.munge.com [PR libc/720].
 
 	* sysdeps/libm-ieee754/k_standard.c: Return NAN for libm not in
-	SVID more for gamma(x) with x interger <= 0.
+	SVID more for gamma(x) with x integer <= 0.
 	Reported by Stephen L Moshier <moshier@mediaone.net>.
 
 	* math/libm-test.c (gamma_test): Add test for gamma(-1) and gamma(0).
diff --git a/configure b/configure
index 1aa2374c20..ccdb95ed97 100755
--- a/configure
+++ b/configure
@@ -1281,10 +1281,10 @@ else
   # Found it, now check the version.
   echo $ac_n "checking version of $CC""... $ac_c" 1>&6
 echo "configure:1284: checking version of $CC" >&5
-  ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcst-]*[0-9.]*\).*$/\1/p'`
+  ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcstp-]*[0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-    egcs-2.9[1-9].*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9|*2.9.[0-9]*)
+    egcs-2.9[1-9].*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|pgcc-2.9[1-9].*|pgcc-2.90.2[789]|pgcc-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9|*2.9.[0-9]*)
        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
diff --git a/configure.in b/configure.in
index be345ed6d2..6b5e8f8ca8 100644
--- a/configure.in
+++ b/configure.in
@@ -451,8 +451,8 @@ AC_PROG_LN_S
 # These programs are version sensitive.
 AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
 AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
-  [version \([egcst-]*[0-9.]*\)],
-  [egcs-2.9[1-9].*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9|*2.9.[0-9]*],
+  [version \([egcstp-]*[0-9.]*\)],
+  [egcs-2.9[1-9].*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|pgcc-2.9[1-9].*|pgcc-2.90.2[789]|pgcc-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9|*2.9.[0-9]*],
   critic_missing=t)
 AC_CHECK_PROG_VER(MAKE, make gmake, --version,
   [version \([0-9][0-9.]*\), by],
diff --git a/elf/elf.h b/elf/elf.h
index 95f964f68b..6553ba3321 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -510,9 +510,6 @@ typedef struct
 					   entry */
 } Elf32_Verdef;
 
-#if 0
-/* XXX We have no information what types should be used for 64 bit
-   architectures.  What is following is only an intelligent guess.  */
 typedef struct
 {
   Elf64_Half	vd_version;		/* Version revision */
@@ -524,11 +521,7 @@ typedef struct
   Elf64_Word	vd_next;		/* Offset in bytes to next verdef
 					   entry */
 } Elf64_Verdef;
-#else
-/* The linker doesn't even parameterize the version info swapping
-   routines.  I wonder if it should or is this good enough.  */
-typedef Elf32_Verdef Elf64_Verdef;
-#endif
+
 
 /* Legal values for vd_version (version revision).  */
 #define VER_DEF_NONE	0		/* No version */
@@ -543,24 +536,18 @@ typedef Elf32_Verdef Elf64_Verdef;
 
 typedef struct
 {
-  Elf32_Addr	vda_name;		/* Version or dependency names */
+  Elf32_Word	vda_name;		/* Version or dependency names */
   Elf32_Word	vda_next;		/* Offset in bytes to next verdaux
 					   entry */
 } Elf32_Verdaux;
 
-#if 0
-/* XXX We have no information what types should be used for 64 bit
-   architectures.  What is following is only an intelligent guess.  */
 typedef struct
 {
-  Elf64_Addr	vda_name;		/* Version or dependency names */
+  Elf64_Word	vda_name;		/* Version or dependency names */
   Elf64_Word	vda_next;		/* Offset in bytes to next verdaux
 					   entry */
 } Elf64_Verdaux;
-#else
-/* The linker doesn't even parameterize this -- should it?  */
-typedef Elf32_Verdaux Elf64_Verdaux;
-#endif
+
 
 /* Version dependency section.  */
 
@@ -568,30 +555,24 @@ typedef struct
 {
   Elf32_Half	vn_version;		/* Version of structure */
   Elf32_Half	vn_cnt;			/* Number of associated aux entries */
-  Elf32_Addr	vn_file;		/* Offset of filename for this
+  Elf32_Word	vn_file;		/* Offset of filename for this
 					   dependency */
   Elf32_Word	vn_aux;			/* Offset in bytes to vernaux array */
   Elf32_Word	vn_next;		/* Offset in bytes to next verneed
 					   entry */
 } Elf32_Verneed;
 
-#if 0
-/* XXX We have no information what types should be used for 64 bit
-   architectures.  What is following is only an intelligent guess.  */
 typedef struct
 {
   Elf64_Half	vn_version;		/* Version of structure */
   Elf64_Half	vn_cnt;			/* Number of associated aux entries */
-  Elf64_Addr	vn_file;		/* Offset of filename for this
+  Elf64_Word	vn_file;		/* Offset of filename for this
 					   dependency */
   Elf64_Word	vn_aux;			/* Offset in bytes to vernaux array */
   Elf64_Word	vn_next;		/* Offset in bytes to next verneed
 					   entry */
 } Elf64_Verneed;
-#else
-/* The linker doesn't even parameterize this -- should it?  */
-typedef Elf32_Verneed Elf64_Verneed;
-#endif
+
 
 /* Legal values for vn_version (version revision).  */
 #define VER_NEED_NONE	 0		/* No version */
@@ -605,30 +586,24 @@ typedef struct
   Elf32_Word	vna_hash;		/* Hash value of dependency name */
   Elf32_Half	vna_flags;		/* Dependency specific information */
   Elf32_Half	vna_other;		/* Unused */
-  Elf32_Addr	vna_name;		/* Dependency name string offset */
+  Elf32_Word	vna_name;		/* Dependency name string offset */
   Elf32_Word	vna_next;		/* Offset in bytes to next vernaux
 					   entry */
 } Elf32_Vernaux;
 
-#if 0
-/* XXX We have no information what types should be used for 64 bit
-   architectures.  What is following is only an intelligent guess.  */
 typedef struct
 {
   Elf64_Word	vna_hash;		/* Hash value of dependency name */
   Elf64_Half	vna_flags;		/* Dependency specific information */
   Elf64_Half	vna_other;		/* Unused */
-  Elf64_Addr	vna_name;		/* Dependency name string offset */
+  Elf64_Word	vna_name;		/* Dependency name string offset */
   Elf64_Word	vna_next;		/* Offset in bytes to next vernaux
 					   entry */
 } Elf64_Vernaux;
-#else
-/* The linker doesn't even parameterize these -- should it?  */
-typedef Elf32_Vernaux Elf64_Vernaux;
-#endif
+
 
 /* Legal values for vna_flags.  */
-#define VER_FLG_WEAK	0x2		/* Weak verison identifier */
+#define VER_FLG_WEAK	0x2		/* Weak version identifier */
 
 
 /* Auxiliary vector.  */
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 4a0cf33aa1..3027bd1655 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,17 @@
+1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* weaks.c: Define pthread_mutexattr_[sg]ettype instead of
+	__pthread_mutexattr_[sg]ettype.  Add more weak aliases.
+	* Versions: Put __pthread_mutexattr_settype under version
+	GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
+	__pthread_mutexattr_gettype.
+
+1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+	* sysdeps/pthread/bits/libc-lock.h: Make
+	__pthread_mutexattr_settype weak.  Don't make
+	__pthread_mutexattr_setkind_np weak.
+
 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
 
 	* manager.c (pthread_handle_create): Check whether sched_setscheduler
diff --git a/linuxthreads/Versions b/linuxthreads/Versions
index cc45a6ceb0..f47727dd35 100644
--- a/linuxthreads/Versions
+++ b/linuxthreads/Versions
@@ -70,7 +70,7 @@ libpthread {
     __pthread_key_create; __pthread_mutex_destroy; __pthread_mutex_init;
     __pthread_mutex_lock; __pthread_mutex_trylock; __pthread_mutex_unlock;
     __pthread_mutexattr_destroy; __pthread_mutexattr_init;
-    __pthread_mutexattr_setkind_np; __pthread_once; __pthread_setspecific;
+    __pthread_mutexattr_settype; __pthread_once; __pthread_setspecific;
 
     # The error functions.
     __errno_location; __h_errno_location;
@@ -92,7 +92,6 @@ libpthread {
 
     pthread_getconcurrency; pthread_setconcurrency;
 
-    __pthread_mutexattr_gettype; __pthread_mutexattr_settype;
     pthread_mutexattr_gettype; pthread_mutexattr_settype;
   }
 }
diff --git a/linuxthreads/sysdeps/pthread/bits/libc-lock.h b/linuxthreads/sysdeps/pthread/bits/libc-lock.h
index db9a4718d3..b84107cfa4 100644
--- a/linuxthreads/sysdeps/pthread/bits/libc-lock.h
+++ b/linuxthreads/sysdeps/pthread/bits/libc-lock.h
@@ -176,7 +176,7 @@ weak_extern (__pthread_mutex_trylock)
 weak_extern (__pthread_mutex_unlock)
 weak_extern (__pthread_mutexattr_init)
 weak_extern (__pthread_mutexattr_destroy)
-weak_extern (__pthread_mutexattr_setkind_np)
+weak_extern (__pthread_mutexattr_settype)
 weak_extern (__pthread_key_create)
 weak_extern (__pthread_setspecific)
 weak_extern (__pthread_getspecific)
@@ -195,7 +195,7 @@ weak_extern (_pthread_cleanup_pop_restore)
 # pragma weak __pthread_mutex_unlock
 # pragma weak __pthread_mutexattr_init
 # pragma weak __pthread_mutexattr_destroy
-# pragma weak __pthread_mutexattr_setkind_np
+# pragma weak __pthread_mutexattr_settype
 # pragma weak __pthread_key_create
 # pragma weak __pthread_setspecific
 # pragma weak __pthread_getspecific
diff --git a/linuxthreads/weaks.c b/linuxthreads/weaks.c
index fc0873bdd9..0ce058bb5c 100644
--- a/linuxthreads/weaks.c
+++ b/linuxthreads/weaks.c
@@ -46,24 +46,46 @@ weak_alias (__pthread_return_0, pthread_attr_setinheritsched)
 weak_alias (__pthread_return_0, pthread_attr_getinheritsched)
 weak_alias (__pthread_return_0, pthread_attr_setscope)
 weak_alias (__pthread_return_0, pthread_attr_getscope)
+weak_alias (__pthread_return_0, pthread_attr_setstackaddr)
+weak_alias (__pthread_return_0, pthread_attr_getstackaddr)
+weak_alias (__pthread_return_0, pthread_attr_setstacksize)
+weak_alias (__pthread_return_0, pthread_attr_getstacksize)
 weak_alias (__pthread_return_0, pthread_mutex_init)
 weak_alias (__pthread_return_0, pthread_mutex_destroy)
 weak_alias (__pthread_return_0, pthread_mutex_lock)
+weak_alias (__pthread_return_0, pthread_mutex_trylock)
 weak_alias (__pthread_return_0, pthread_mutex_unlock)
-weak_alias (__pthread_return_0, __pthread_mutexattr_settype)
-weak_alias (__pthread_return_0, __pthread_mutexattr_gettype)
+weak_alias (__pthread_return_0, pthread_mutexattr_init)
+weak_alias (__pthread_return_0, pthread_mutexattr_destroy)
+weak_alias (__pthread_return_0, pthread_mutexattr_settype)
+weak_alias (__pthread_return_0, pthread_mutexattr_gettype)
 weak_alias (__pthread_return_0, pthread_condattr_init)
 weak_alias (__pthread_return_0, pthread_condattr_destroy)
 weak_alias (__pthread_return_0, pthread_setschedparam)
 weak_alias (__pthread_return_0, pthread_getschedparam)
+weak_alias (__pthread_return_0, pthread_getcancelstate)
 weak_alias (__pthread_return_0, pthread_setcancelstate)
 weak_alias (__pthread_return_0, pthread_setcanceltype)
+weak_alias (__pthread_return_0, pthread_setconcurrency)
+weak_alias (__pthread_return_0, pthread_getconcurrency)
 weak_alias (__pthread_return_0, pthread_self)
 weak_alias (__pthread_return_0, pthread_cond_init)
 weak_alias (__pthread_return_0, pthread_cond_destroy)
 weak_alias (__pthread_return_0, pthread_cond_wait)
+weak_alias (__pthread_return_0, pthread_cond_timedwait)
 weak_alias (__pthread_return_0, pthread_cond_signal)
 weak_alias (__pthread_return_0, pthread_cond_broadcast)
+weak_alias (__pthread_return_0, pthread_rwlock_init)
+weak_alias (__pthread_return_0, pthread_rwlock_destroy)
+weak_alias (__pthread_return_0, pthread_rwlock_rdlock)
+weak_alias (__pthread_return_0, pthread_rwlock_wrlock)
+weak_alias (__pthread_return_0, pthread_rwlock_tryrdlock)
+weak_alias (__pthread_return_0, pthread_rwlock_trywrlock)
+weak_alias (__pthread_return_0, pthread_rwlock_unlock)
+weak_alias (__pthread_return_0, pthread_rwlockattr_init)
+weak_alias (__pthread_return_0, pthread_rwlockattr_destroy)
+weak_alias (__pthread_return_0, pthread_rwlockattr_setpshared)
+weak_alias (__pthread_return_0, pthread_rwlockattr_getpshared)
 
 
 /* Those are pthread functions which return 1 if successful. */
diff --git a/nscd/dbg_log.c b/nscd/dbg_log.c
index 37065e446e..b2b8b3e31c 100644
--- a/nscd/dbg_log.c
+++ b/nscd/dbg_log.c
@@ -51,7 +51,10 @@ dbg_log (const char *fmt,...)
     {
       snprintf (msg, sizeof (msg), "%d: %s\n", getpid (), msg2);
       if (dbgout)
-	fputs (msg, dbgout);
+	{
+	  fputs (msg, dbgout);
+	  fflush (dbgout);
+	}
       else
 	fputs (msg, stderr);
     }
diff --git a/nscd/nscd.c b/nscd/nscd.c
index e1c636775f..9ddbb5f54e 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -116,11 +116,6 @@ main (int argc, char **argv)
       exit (EXIT_FAILURE);
     }
 
-  signal (SIGINT, termination_handler);
-  signal (SIGQUIT, termination_handler);
-  signal (SIGTERM, termination_handler);
-  signal (SIGPIPE, SIG_IGN);
-
   /* Check if we are already running. */
   if (check_pid (_PATH_NSCDPID))
     {
@@ -131,14 +126,21 @@ main (int argc, char **argv)
   /* Behave like a daemon.  */
   if (go_background)
     {
+      int i;
+
+      if (fork ())
+	exit (0);
+
+      for (i = 0; i < getdtablesize (); i++)
+	close (i);
+
+      if (fork ())
+	exit (0);
+
+      chdir ("/");
+
       openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON);
 
-      if (daemon (0, 0) < 0)
-	{
-	  fprintf (stderr, _("connot auto-background: %s\n"),
-		   strerror (errno));
-	  exit (EXIT_FAILURE);
-	}
       if (write_pid (_PATH_NSCDPID) < 0)
         dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno));
 
@@ -147,6 +149,12 @@ main (int argc, char **argv)
       signal (SIGTTIN, SIG_IGN);
       signal (SIGTSTP, SIG_IGN);
     }
+
+  signal (SIGINT, termination_handler);
+  signal (SIGQUIT, termination_handler);
+  signal (SIGTERM, termination_handler);
+  signal (SIGPIPE, SIG_IGN);
+
   /* Cleanup files created by a previous `bind' */
   unlink (_PATH_NSCDSOCKET);
 
diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c
index 56bc0fbd53..63347bdb20 100644
--- a/sysdeps/generic/glob.c
+++ b/sysdeps/generic/glob.c
@@ -490,13 +490,25 @@ glob (pattern, flags, errfunc, pglob)
   filename = strrchr (pattern, '/');
   if (filename == NULL)
     {
-      filename = pattern;
+      /* This can mean two things: a simple name or "~name".  The later
+	 case is nothing but a notation for a directory.  */
+      if ((flags & GLOB_TILDE) && pattern[0] == '~')
+	{
+	  dirname = pattern;
+	  dirlen = strlen (pattern);
+
+	  filename = "";
+	}
+      else
+	{
+	  filename = pattern;
 #ifdef _AMIGA
-      dirname = (char *) "";
+	  dirname = (char *) "";
 #else
-      dirname = (char *) ".";
+	  dirname = (char *) ".";
 #endif
-      dirlen = 0;
+	  dirlen = 0;
+	}
     }
   else if (filename == pattern)
     {
@@ -516,15 +528,16 @@ glob (pattern, flags, errfunc, pglob)
       dirname[dirlen] = '\0';
 #endif
       ++filename;
-    }
 
-  if (filename[0] == '\0' && dirlen > 1)
-    /* "pattern/".  Expand "pattern", appending slashes.  */
-    {
-      int val = glob (dirname, flags | GLOB_MARK, errfunc, pglob);
-      if (val == 0)
-	pglob->gl_flags = (pglob->gl_flags & ~GLOB_MARK) | (flags & GLOB_MARK);
-      return val;
+      if (filename[0] == '\0' && dirlen > 1)
+	/* "pattern/".  Expand "pattern", appending slashes.  */
+	{
+	  int val = glob (dirname, flags | GLOB_MARK, errfunc, pglob);
+	  if (val == 0)
+	    pglob->gl_flags = ((pglob->gl_flags & ~GLOB_MARK)
+			       | (flags & GLOB_MARK));
+	  return val;
+	}
     }
 
   if (!(flags & GLOB_APPEND))