Index: ChangeLog
===================================================================
RCS file: /home/cvs/fsf/libc/ChangeLog,v
retrieving revision 1.780.2.45
diff -u -r1.780.2.45 ChangeLog
--- ChangeLog	1997/08/29 18:18:35	1.780.2.45
+++ ChangeLog	1997/09/07 14:16:46
@@ -1,3 +1,32 @@
+1997-09-06  Paul Eggert  <eggert@twinsun.com>
+
+	* tzfile.c (__tzfile_read): Don't read a file if TZ is the empty
+	string, just use UTC without leap seconds.  This is for compatibility
+	with the Olson code.
+
+1997-09-06  Paul Eggert  <eggert@twinsun.com>
+
+	* time/tzset.c (__tzname_max): Lock tz data structures before
+	invoking tzset_internal.
+
+	* time/tzfile.c: Define compute_tzname_max statically.
+
+1997-09-07 15:51  Ulrich Drepper  <drepper@cygnus.com>
+
+	* sysdeps/i386/selectbits.h [__GNUC__] (__FD_ZERO, __FD_SET, __FD_CLR,
+	__FD_ISSET): Use correct casts to address array correctly.
+	Reported by urbanw@cs.umu.se.
+
+1997-09-05 06:11  Ulrich Drepper  <drepper@cygnus.com>
+
+	* gmon/gmon.c (write_bb_counts): Make sure entries are written before
+	next head.  Reported by baccala@FreeSoft.org.
+
+1997-09-01 14:16  Ulrich Drepper  <drepper@cygnus.com>
+
+	* sysdeps/stub/sigaction.c: Fix typo.
+	Reported by Klaus Reichl <klaus.reichl@aut.alcatel.at>.
+
 1997-08-28 17:30  Ulrich Drepper  <drepper@cygnus.com>
 
 	* catgets/catgets.c (catopen): Correctly determine length of string
Index: gmon/gmon.c
===================================================================
RCS file: /home/cvs/fsf/libc/gmon/gmon.c,v
retrieving revision 1.8.2.4
diff -u -r1.8.2.4 gmon.c
--- gmon/gmon.c	1997/08/08 00:24:13	1.8.2.4
+++ gmon/gmon.c	1997/09/05 04:10:55
@@ -285,8 +285,9 @@
 	  bbbody[nfilled++].iov_base = (char *) &grp->addresses[i];
 	  bbbody[nfilled++].iov_base = &grp->counts[i];
 	}
+      if (nfilled > 0)
+	__writev (fd, bbbody, nfilled);
     }
-  __writev (fd, bbbody, nfilled);
 }
 
 
Index: sysdeps/i386/selectbits.h
===================================================================
RCS file: /home/cvs/fsf/libc/sysdeps/i386/Attic/selectbits.h,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 selectbits.h
--- sysdeps/i386/selectbits.h	1997/08/25 20:46:27	1.1.2.1
+++ sysdeps/i386/selectbits.h	1997/09/07 13:45:48
@@ -22,29 +22,30 @@
 #if defined __GNUC__ && __GNUC__ >= 2
 
 # define __FD_ZERO(fdsetp) \
-  __asm__ __volatile__ ("cld ; rep ; stosl"				      \
-			: "=m" (*(__fd_set *) (fdsetp))			      \
+  __asm__ __volatile__ ("cld; rep; stosl"				      \
+			: "=m" (((__fd_mask *)				      \
+				 (fdsetp))[__FDELT (__FD_SETSIZE)])	      \
 			: "a" (0), "c" (sizeof (__fd_set)		      \
 					/ sizeof (__fd_mask)),		      \
-			  "D" ((__fd_set *) (fdsetp))			      \
+			  "D" ((__fd_mask *) (fdsetp))			      \
 			:"cx","di")
 # define __FD_SET(fd, fdsetp) \
   __asm__ __volatile__ ("btsl %1,%0"					      \
-			: "=m" (((__fd_set *) (fdsetp))[__FDELT (fd)])	      \
+			: "=m" (((__fd_mask *) (fdsetp))[__FDELT (fd)])	      \
 			: "r" (((int) (fd)) % __NFDBITS)		      \
 			: "cc")
 # define __FD_CLR(fd, fdsetp) \
   __asm__ __volatile__ ("btrl %1,%0"					      \
-			: "=m" (((__fd_set *) (fdsetp))[__FDELT (fd)])	      \
+			: "=m" (((__fd_mask *) (fdsetp))[__FDELT (fd)])	      \
 			: "r" (((int) (fd)) % __NFDBITS)		      \
 			: "cc")
 # define __FD_ISSET(fd, fdsetp) \
   (__extension__							      \
-   ({unsigned int __result;						      \
-     __asm__ __volatile__ ("btl %1,%2 ; setcb %b0; andl $1,%0"		      \
+   ({register char __result;						      \
+     __asm__ __volatile__ ("btl %1,%2 ; setcb %b0"			      \
 			   : "=q" (__result)				      \
 			   : "r" (((int) (fd)) % __NFDBITS),		      \
-			     "m" (((__fd_set *) (fdsetp))[__FDELT (fd)])      \
+			     "m" (((__fd_mask *) (fdsetp))[__FDELT (fd)])     \
 			   : "cc");					      \
      __result; }))
 
Index: sysdeps/stub/sigaction.c
===================================================================
RCS file: /home/cvs/fsf/libc/sysdeps/stub/sigaction.c,v
retrieving revision 1.3
diff -u -r1.3 sigaction.c
--- sysdeps/stub/sigaction.c	1996/09/27 03:37:23	1.3
+++ sysdeps/stub/sigaction.c	1997/09/01 12:15:42
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1995, 1996, 1997 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
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
 
 #include <errno.h>
 #include <signal.h>
@@ -26,7 +26,7 @@
 __sigaction (sig, act, oact)
      int sig;
      const struct sigaction *act;
-     struct sigaction *OACT;
+     struct sigaction *oact;
 {
   if (sig <= 0 || sig >= NSIG)
     {
Index: sysdeps/unix/sysv/linux/netinet/tcp.h
===================================================================
RCS file: /home/cvs/fsf/libc/sysdeps/unix/sysv/linux/netinet/tcp.h,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 tcp.h
--- sysdeps/unix/sysv/linux/netinet/tcp.h	1997/08/25 20:47:19	1.1.2.2
+++ sysdeps/unix/sysv/linux/netinet/tcp.h	1997/08/27 10:49:06
@@ -89,7 +89,7 @@
     u_int16_t psh:1;
     u_int16_t ack:1;
     u_int16_t urg:1;
-    urg res2:2;
+    u_int16_t res2:2;
 #elif __BYTE_ORDER == __BIG_ENDIAN
     u_int16_t doff:4;
     u_int16_t res1:4;
Index: time/tzfile.c
===================================================================
RCS file: /home/cvs/fsf/libc/time/tzfile.c,v
retrieving revision 1.23.4.2
diff -u -r1.23.4.2 tzfile.c
--- time/tzfile.c	1997/08/05 23:36:17	1.23.4.2
+++ time/tzfile.c	1997/09/07 14:16:17
@@ -112,8 +112,8 @@
     /* No user specification; use the site-wide default.  */
     file = TZDEFAULT;
   else if (*file == '\0')
-    /* User specified the empty string; use UTC explicitly.  */
-    file = "Universal";
+    /* User specified the empty string; use UTC with no leap seconds.  */
+    return;
   else
     {
       /* We must not allow to read an arbitrary file in a setuid
@@ -455,7 +455,7 @@
   return 1;
 }
 
-void
+static void
 compute_tzname_max (size_t chars)
 {
   extern size_t __tzname_cur_max; /* Defined in tzset.c. */
Index: time/tzset.c
===================================================================
RCS file: /home/cvs/fsf/libc/time/tzset.c,v
retrieving revision 1.41.4.3
diff -u -r1.41.4.3 tzset.c
--- time/tzset.c	1997/08/23 21:52:31	1.41.4.3
+++ time/tzset.c	1997/09/07 15:18:57
@@ -17,6 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <ctype.h>
+#include <libc-lock.h>
 #include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -44,6 +45,9 @@
 weak_alias (__daylight, daylight)
 weak_alias (__timezone, timezone)
 
+/* This locks all the state variables in tzfile.c and this file.  */
+__libc_lock_define (static, tzset_lock)
+
 
 #define	min(a, b)	((a) < (b) ? (a) : (b))
 #define	max(a, b)	((a) > (b) ? (a) : (b))
@@ -430,8 +434,12 @@
 long int
 __tzname_max ()
 {
+  __libc_lock_lock (tzset_lock);
+
   __tzset_internal (0);
 
+  __libc_lock_unlock (tzset_lock);
+
   return __tzname_cur_max;
 }
 
@@ -552,18 +560,13 @@
   return 1;
 }
 
-#include <libc-lock.h>
-
-/* This locks all the state variables in tzfile.c and this file.  */
-__libc_lock_define (, __tzset_lock)
-
 /* Reinterpret the TZ environment variable and set `tzname'.  */
 #undef tzset
 
 void
 __tzset (void)
 {
-  __libc_lock_lock (__tzset_lock);
+  __libc_lock_lock (tzset_lock);
 
   __tzset_internal (1);
 
@@ -574,6 +577,6 @@
       __tzname[1] = (char *) tz_rules[1].name;
     }
 
-  __libc_lock_unlock (__tzset_lock);
+  __libc_lock_unlock (tzset_lock);
 }
 weak_alias (__tzset, tzset)
