mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-06 14:10:30 +08:00
Change for 2.0.5b
This commit is contained in:
parent
b0486b1cbd
commit
801c353ac5
29
ChangeLog
29
ChangeLog
@ -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
|
||||
|
@ -65,6 +65,7 @@ __bt_free(t, h)
|
||||
h->prevpg = P_INVALID;
|
||||
h->nextpg = t->bt_free;
|
||||
t->bt_free = h->pgno;
|
||||
F_SET(t, B_METADIRTY);
|
||||
|
||||
/* Make sure the page gets written back. */
|
||||
return (mpool_put(t->bt_mp, h, MPOOL_DIRTY));
|
||||
@ -92,6 +93,7 @@ __bt_new(t, npg)
|
||||
(h = mpool_get(t->bt_mp, t->bt_free, 0)) != NULL) {
|
||||
*npg = t->bt_free;
|
||||
t->bt_free = h->nextpg;
|
||||
F_SET(t, B_METADIRTY);
|
||||
return (h);
|
||||
}
|
||||
return (mpool_new(t->bt_mp, npg));
|
||||
|
@ -285,8 +285,9 @@ write_bb_counts (fd)
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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; }))
|
||||
|
||||
|
@ -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 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.
|
||||
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. */
|
||||
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 @@ int
|
||||
__sigaction (sig, act, oact)
|
||||
int sig;
|
||||
const struct sigaction *act;
|
||||
struct sigaction *OACT;
|
||||
struct sigaction *oact;
|
||||
{
|
||||
if (sig <= 0 || sig >= NSIG)
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ struct tcphdr
|
||||
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;
|
||||
|
@ -112,8 +112,8 @@ __tzfile_read (const char *file)
|
||||
/* 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 @@ __tzfile_compute (time_t timer, long int *leap_correct, int *leap_hit)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
compute_tzname_max (size_t chars)
|
||||
{
|
||||
extern size_t __tzname_cur_max; /* Defined in tzset.c. */
|
||||
|
17
time/tzset.c
17
time/tzset.c
@ -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 (__tzname, tzname)
|
||||
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 @@ size_t __tzname_cur_max;
|
||||
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 @@ __tz_compute (timer, tm)
|
||||
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 @@ __tzset (void)
|
||||
__tzname[1] = (char *) tz_rules[1].name;
|
||||
}
|
||||
|
||||
__libc_lock_unlock (__tzset_lock);
|
||||
__libc_lock_unlock (tzset_lock);
|
||||
}
|
||||
weak_alias (__tzset, tzset)
|
||||
|
Loading…
x
Reference in New Issue
Block a user