diff options
author | Roland McGrath <roland@gnu.org> | 1995-03-10 18:59:45 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1995-03-10 18:59:45 +0000 |
commit | a2cafe309c31ecc13ca008f1e27a9c7455a95c58 (patch) | |
tree | edb44d571b459b013bc24f0515ed60365185b790 | |
parent | cfe33fd93812d3798170b10456eb129031ec994f (diff) | |
download | glibc-a2cafe309c31ecc13ca008f1e27a9c7455a95c58.zip glibc-a2cafe309c31ecc13ca008f1e27a9c7455a95c58.tar.gz glibc-a2cafe309c31ecc13ca008f1e27a9c7455a95c58.tar.bz2 |
Regenerated
-rw-r--r-- | posix/glob/ChangeLog | 315 | ||||
-rw-r--r-- | time/tzfile.c | 57 |
2 files changed, 355 insertions, 17 deletions
diff --git a/posix/glob/ChangeLog b/posix/glob/ChangeLog new file mode 100644 index 0000000..3b5108b --- /dev/null +++ b/posix/glob/ChangeLog @@ -0,0 +1,315 @@ +Wed Mar 8 13:38:13 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * posix/glob/configure.bat: Fixes from DJ. + +Wed Feb 22 00:44:41 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * posix/glob/configure.in: Put AC_ISC_POSIX before AC_CONST. + +Sun Feb 5 17:59:53 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * malloc/malloc.c (__malloc_extra_blocks): New variable. + (malloc): When getting more core, get __malloc_extra_blocks extra; + put the new block at the end of the free list and let the next loop + iteration use the initial portion of it. + * malloc/free.c (_free_internal): Account for twice + __malloc_extra_blocks in deciding if we have so much extra memory + we should return it to the system. + * malloc/malloc.h (__malloc_extra_blocks): Declare it. + * posix/glob.c (prefix_array, glob_pattern_p): Remove gratuitous + const in parameter decl. + +Fri Jan 27 17:53:49 1995 Jim Meyering (meyering@comco.com) + + * posix/fnmatch.c: Declare errno if it's not defined. + That's simpler than testing #if !defined(__GNU_LIBRARY__) + && !defined(STDC_HEADERS). + +Thu Jan 26 00:02:01 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * io/ftw.c: Avoid `ret' as variable name. + * posix/glob.c: Likewise. + +Wed Jan 25 00:45:56 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * posix/glob/configure.in: Put AC_AIX and AC_MINIX early, before + any compile tests. + +Mon Jan 16 15:49:07 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * posix/glob/Makefile.in: Remove config.h and config.log. + +Sun Jan 15 06:56:47 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * posix/glob/configure.in: Add AC_CONST check. + +Wed Dec 7 14:05:12 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * posix/glob/Makefile.in (realclean): Remove config.status. + + * posix/glob/Makefile.in (DEFS): New variable, set from @DEFS@. + (CPPFLAGS): Remove @DEFS@ from here. + (.c.o): Use $(DEFS). + +Tue Dec 6 19:04:50 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * posix/glob/Makefile.in (CPPFLAGS): Include @DEFS@. + +Mon Dec 5 12:05:10 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * posix/glob/configure.in: Add AC_PROG_CC. + +Mon Nov 7 00:38:45 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * posix/glob/configure.in: Converted to Autoconf v2. + * posix/glob.c: Test HAVE_DIRENT_H, HAVE_SYS_DIR_H, HAVE_NDIR_H + instead of DIRENT, SYSDIR, NDIR. + * posix/glob/Makefile.in (CC): New variable, set from @CC@. + (CPPFLAGS): Set from @CPPFLAGS@, not @DEFS@. + +Sun Oct 09 01:19:38 1994 Jim Meyering (meyering@comco.com) + + * posix/fnmatch.c: Remove CONFIG_BROKETS conditional. + +Sun Oct 2 18:35:16 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * posix/glob.h (__P): Change arg name to `protos', for congruence + with 4.4 BSD. + * posix/fnmatch.h (__P): Likewise. + +Tue Sep 6 19:06:00 1994 Roland McGrath <roland@geech.gnu.ai.mit.edu> + + * posix/glob.c (prefix_array, glob): Avoid const on initialized + variables. Some compiler generates bad code. + +Mon Jul 25 17:17:28 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * posix/glob/configure.bat: New file. + * posix/Makefile (glob.tar): Add glob/configure.bat. + +Tue Dec 14 13:08:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/fnmatch.h: #undef FNM_PATHNAME, FNM_NOESCAPE, and + FNM_PERIOD before defining them. + +Mon Oct 18 04:22:42 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob/configure.in: Use AC_HAVE_HEADERS instead of + AC_MEMORY_H and AC_UNISTD_H; omit AC_USG (not needed). + +Sun Oct 10 14:31:35 1993 Jim Meyering (meyering@comco.com) + + * posix/fnmatch.c [CONFIG_BROKETS]: Include <config.h> only under + this condition, else "config.h". + +Wed May 12 16:24:23 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob.c: Move include <unistd.h> before dir includes. + [HAVE_UNISTD_H] [! POSIX] [_POSIX_SOURCE]: Define POSIX. + +Thu Apr 22 17:40:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob/Makefile.in (.c.o): Put $(CFLAGS) last. + (glob.o): Depend on glob.c. + (fnmatch.o): Depend on fnmatch.c. + +Fri Apr 16 12:24:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c, posix/fnmatch.c: Surround code with + #if defined (_LIBC) || !defined (__GNU_LIBRARY__) + +Wed Apr 14 12:49:10 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c [USG, NeXT]: Don't test these. + [HAVE_STRING_H]: Test this to include string.h and define ANSI_STRING. + [HAVE_MEMORY_H]: Test this instead of NEED_MEMORY_H. + [! ANSI_STRING]: Put decls of bcopy and #define of memcpy et al here. + + * posix/fnmatch.c [HAVE_CONFIG_H]: #include "config.h". + +Mon Apr 12 16:34:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c: Rationalize directory header conditionals. + +Sun Apr 11 18:53:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/fnmatch.h [__cplusplus || __STDC__]: Don't #define const. + +Sun Mar 28 16:12:33 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/fnmatch.c (case '*'): Before final loop, fold C1, rather + than foling *P before it goes into C1. C might need folding instead. + +Thu Mar 25 13:40:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/fnmatch.h [!_POSIX_C_SOURCE || ...]: Make this test + _GNU_SOURCE, not _BSD_SOURCE; these are our extensions, not theirs. + (FNM_CASEFOLD): New bit. + (__FNM_FLAGS): Removed macro. + * posix/fnmatch.c (fnmatch): Don't test for bogus flag bits; who cares? + (FOLD): New macro to casefold a char if FNM_CASEFOLD. + Use it to fold all chars before comparison. + +Mon Mar 8 13:20:02 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob/Makefile.in (VPATH): Set this to @srcdir@. + (srcdir): Set this to $(VPATH). + + * posix/glob.c (glob): In no matches with GLOB_NOCHECK set case, + add NULL terminator to PGLOB->gl_pathv. + (prefix_array): Renamed arg PREFIX to DIRNAME, local var PRELEN to + DIRLEN. If DIRNAME is just "/", don't prepend it, so we get + "/foo" instead of "//foo". + (glob): Move qsort call outside of the else clause of the + glob_pattern_p test; it should always be done. + +Thu Jan 21 20:12:25 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob.c: Put #includes of <glob.h> and <fnmatch.h> after + all system includes, in case one of them has conflicting defns of + FNM_* or GLOB_*, so we will redefine. #undef FNM_* and GLOB_* + before including our headers. + +Tue Jan 19 16:16:05 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob.c (my_realloc): Cast result of malloc/realloc to (char *). + +Thu Jan 14 13:52:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob/Makefile.in (realclean): Remove Makefile. + +Mon Jan 4 17:05:44 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob/Makefile.in (RANLIB): Define to @RANLIB@. + (RANLIB_TEST): Removed. + (libglob.a): Don't use it. + +Mon Dec 28 15:50:31 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c [HAVE_CONFIG_H]: Test this, not SHELL, to decide + whether or not we want to #include "config.h". + +Wed Nov 18 13:42:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/fnmatch.h (FNM_LEADING_DIR): New flag. + * posix/fnmatch.c (fnmatch): Support it. + +Sun Oct 11 16:58:36 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c (__glob_{open,read,close}dir_hook): New vars. + (glob_in_dir): Use them. + * posix/glob.h: Declare them. + +Fri Sep 18 16:32:16 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob/Makefile.in (AR, ARFLAGS): Define. + (libglob.a): Use those vars instead of hardcoding. + +Thu Aug 13 18:30:58 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c: Always #include <sys/types.h>. + [! USG]: Don't do it here. + [STDC_HEADERS]: Test this instead of __STDC__ for size_t. + [HAVE_STRCOLL]: Test this instead of ANSI_STRING for strcoll. + + * posix/glob/Makefile.in (Makefile): Remove rule. + +Tue Aug 11 15:01:50 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob.c [_AIX]: Don't declare alloca. + +Thu Jul 30 15:42:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob/Makefile.in (Makefile): Depend on config.status; invoke + it directly instead of using $(SHELL). + + * posix/glob.c [! USG]: #include <sys/types.h> before <sys/dir.h>. + +Sun Jul 26 17:03:31 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c [_AIX]: #pragma alloca first thing. + [ANSI_STRING]: Remove #define's for index et al. + +Thu Jul 9 21:27:39 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c [STDC_STRINGS]: Don't test this. + [! ANSI_STRING]: Put memcpy, strrchr, memset defns here instead. + + * posix/glob/Makefile.in (glob.o, fnmatch.o): / after $(srcdir). + +Sat Jul 4 20:44:42 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob/Makefile.in (glob.o, fnmatch.o): Put $(srcdir) on deps. + +Wed Jul 1 00:13:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c [! ANSI_STRING]: #define strcoll to strcmp. + Remove extra decls of free, qsort, malloc, and realloc. + +Wed Jun 24 19:09:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c [DIRENT] (direct): Don't define to dirent. + [! DIRENT] (direct): Define to dirent. + +Wed Jun 17 17:58:05 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob.c (my_realloc): Test only __GNU_LIBRARY__. Can't trust + STDC_HEADERS. + +Tue Jun 16 20:20:01 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob/Makefile: Moved to posix/glob/Makefile.in. + (VPATH, srcdir, CPPFLAGS): Define to be replaced by autoconf. + + * posix/glob.c: Rearranged conditionals for use with autoconf. + +Tue Jun 9 20:15:12 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob/Makefile: Fixed copyright notice. + (realclean): Don't remove ~ backup files. + +Tue Jun 2 21:49:22 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob.c (__ptr_t): Define. + +Wed May 27 18:09:40 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/fnmatch.h (FNM_FILE_NAME): Alias for FNM_PATHNAME. + +Fri May 22 01:52:04 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob.h, posix/fnmatch.h: Use explicit cruft for C++. + Define __P and const for C++/ANSI vs old C ourselves, to avoid + dependence on <sys/cdefs.h>. + +Sun May 17 15:50:00 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * posix/glob.c (glob): Don't let us fall off the end without returning. + +Thu May 14 01:45:12 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * posix/glob.h (GLOB_MAGCHAR): Check user feature-test macros, + rather than __USE_BSD, so we don't depend on features.h. + + * posix/glob.h [__USE_BSD] (GLOB_MAGCHAR): Declare. + (glob_t): Added member `gl_flags'. + * posix/glob.c (glob, glob_in_dir): Set gl_flags member to FLAGS; + or in GLOB_MAGCHAR if any metachars are seen. + +Thu Jan 16 18:43:05 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * posix/glob.c [sgi]: No alloca.h, after all. + +Fri Oct 18 15:27:58 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c [sgi]: Use <sys/dir.h>. + +Tue Jul 23 14:11:29 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/glob.c: Don't #include <stddef.h> #ifdef sun. + Is there anyone on the face of the planet other than me capable of + implementing the ANSI C standard to spec???? + + * posix/glob.c [DIRENT]: #include <sys/types.h> before <dirent.h> + #ifdef USG. + diff --git a/time/tzfile.c b/time/tzfile.c index 8ee4896..9ff24df 100644 --- a/time/tzfile.c +++ b/time/tzfile.c @@ -54,10 +54,26 @@ static char *zone_names = NULL; static size_t num_leaps; static struct leap *leaps = NULL; -#define uc2ul(x) _uc2ul((unsigned char *) (x)) -#define _uc2ul(x) \ - ((x)[3] + ((x)[2] << CHAR_BIT) + ((x)[1] << (2 * CHAR_BIT)) + \ - ((x)[0] << (3 * CHAR_BIT))) +#include <endian.h> + +/* Decode the four bytes at PTR as a signed integer in network byte order. */ +static inline int +decode (const void *ptr) +{ +#if BYTE_ORDER == BIG_ENDIAN + return *(const int *) ptr; +#else + const unsigned char *p = ptr; + int result = 0; + + result = (result << 8) | *p++; + result = (result << 8) | *p++; + result = (result << 8) | *p++; + result = (result << 8) | *p++; + + return result; +#endif +} void DEFUN(__tzfile_read, (file), CONST char *file) @@ -107,12 +123,12 @@ DEFUN(__tzfile_read, (file), CONST char *file) if (fread((PTR) &tzhead, sizeof(tzhead), 1, f) != 1) goto lose; - num_transitions = (size_t) uc2ul(tzhead.tzh_timecnt); - num_types = (size_t) uc2ul (tzhead.tzh_typecnt); - chars = (size_t) uc2ul (tzhead.tzh_charcnt); - num_leaps = (size_t) uc2ul (tzhead.tzh_leapcnt); - num_isstd = (size_t) uc2ul (tzhead.tzh_ttisstdcnt); - num_isgmt = (size_t) uc2ul (tzhead.tzh_ttisgmtcnt); + num_transitions = (size_t) decode (tzhead.tzh_timecnt); + num_types = (size_t) decode (tzhead.tzh_typecnt); + chars = (size_t) decode (tzhead.tzh_charcnt); + num_leaps = (size_t) decode (tzhead.tzh_leapcnt); + num_isstd = (size_t) decode (tzhead.tzh_ttisstdcnt); + num_isgmt = (size_t) decode (tzhead.tzh_ttisgmtcnt); if (num_transitions > 0) { @@ -142,13 +158,20 @@ DEFUN(__tzfile_read, (file), CONST char *file) goto lose; } - if (fread((PTR) transitions, sizeof(time_t), - num_transitions, f) != num_transitions || + if (fread((PTR) transitions, 4, num_transitions, f) != num_transitions || fread((PTR) type_idxs, 1, num_transitions, f) != num_transitions) goto lose; - for (i = 0; i < num_transitions; ++i) - transitions[i] = uc2ul (&transitions[i]); + if (BYTE_ORDER != BIG_ENDIAN || sizeof (time_t) != 4) + { + /* Decode the transition times, stored as 4-byte integers in + network (big-endian) byte order. We work from the end of + the array so as not to clobber the next element to be + processed when sizeof (time_t) > 4. */ + i = num_transitions; + while (num_transitions-- > 0) + transitions[i] = decode ((char *) transitions + i*4); + } for (i = 0; i < num_types; ++i) { @@ -157,7 +180,7 @@ DEFUN(__tzfile_read, (file), CONST char *file) fread((PTR) &types[i].isdst, 1, 1, f) != 1 || fread((PTR) &types[i].idx, 1, 1, f) != 1) goto lose; - types[i].offset = (long int) uc2ul(x); + types[i].offset = (long int) decode (x); } if (fread((PTR) zone_names, 1, chars, f) != chars) @@ -168,10 +191,10 @@ DEFUN(__tzfile_read, (file), CONST char *file) unsigned char x[4]; if (fread((PTR) x, 1, sizeof(x), f) != sizeof(x)) goto lose; - leaps[i].transition = (time_t) uc2ul(x); + leaps[i].transition = (time_t) decode (x); if (fread((PTR) x, 1, sizeof(x), f) != sizeof(x)) goto lose; - leaps[i].change = (long int) uc2ul(x); + leaps[i].change = (long int) decode (x); } for (i = 0; i < num_isstd; ++i) |