Index: linux/libc/ChangeLog diff -c linux/libc/ChangeLog:1.169 linux/libc/ChangeLog:1.172 *** linux/libc/ChangeLog:1.169 Fri Mar 14 20:32:12 1997 --- linux/libc/ChangeLog Mon Mar 24 17:37:33 1997 *************** *** 1,3 **** --- 1,51 ---- + Sun Mar 23 14:24:34 1997 H.J. Lu (hjl@gnu.ai.mit.edu) + + * version 5.4.25 is released. + + * <_G_config.h>: change version to 5.4.25. + + * elf/libc/jump.params: set version to 5.4.25. + + * release.libc: update. + + Sun Mar 23 14:21:04 1997 H.J. Lu (hjl@gnu.ai.mit.edu) + + * sysdeps/linux/readv.c: + * sysdeps/linux/writev.c: check count <= UIO_FASTIOV + for error and use emulation if necessary. + + * posix/putenv.c: backed out the change on Fri Feb 21 13:28:23 + 1997 H.J. Lu (hjl@gnu.ai.mit.edu) since it breaks many + TeX programs unless they are recompiled with -DSMART_PUTENV. + + * (_PATH_DEFPATH): remove ".". + + Thu Mar 20 13:01:39 1997 Thorsten Kukuk + + * nys/yp/src/yp.h: removed. + + * nys/yp/src/yp_clnt.c: + * nys/yp/src/yp_conf.c: + * nys/yp/src/yp_if.c: + * nys/yp/src/yp_xdr.c: modified for new xdr_domainname (). + + Mon Mar 17 07:56:12 1997 H.J. Lu (hjl@gnu.ai.mit.edu) + + * bsd/setenv.c (setenv): don't copy name when we reuse the + buffer for replacement. + + Mon Feb 24 23:05:00 1997 Wolfram Gloger + + * dl-malloc/malloc.c (malloc_get_state): New function. + Saves global malloc state to an opaque data structure which + is dynamically allocated in the heap. + + * dl-malloc/malloc.c (malloc_set_state): New function. + Restore previously obtained state. + + * : Add declaration of malloc_get_state() + and malloc_set_state(). + Fri Mar 14 20:01:08 1997 H.J. Lu (hjl@gnu.ai.mit.edu) * version 5.4.24 is released. Index: linux/libc/release.libc diff -c linux/libc/release.libc:1.39 linux/libc/release.libc:1.41 *** linux/libc/release.libc:1.39 Fri Mar 14 20:03:01 1997 --- linux/libc/release.libc Sun Mar 23 14:34:04 1997 *************** *** 1,8 **** Hi, Gals and Guys, ! I have modified the NIS support in glibc. Please get the latst ! ypclients at where you get this C library. Please test NIS programs ! as much as you can. Thanks. There is a NYS bug. If a service is not available, the some NIS/NIS+ routines will give back a NULL pointer, but the other functions expect a --- 1,18 ---- Hi, Gals and Guys, ! glibc's putenv () was used in libc 5.4.24 which breaks many TeX ! binaries. You have to re-compile them with -DSMART_PUTENV. Otherwise ! they won't work. Please see kpathsea/xputenv.c in those packages for ! details. I backed this change out in libc 5.4.25. ! ! I have modified the NIS support in libc, which is not compatible ! with the previous version, but is compatible with SunOS, Solaris, ... ! except for those brain dead xxxBSD. Please make sure you have the ! same ypclients as the one at where you get this C library. Otherwise ! your NIS won't work with the modified NIS code in this libc. If you ! use a different yp client other than those in my YP clients package, ! you may need a patch. Please send me a note and I will fix it for ! you as soon as possible. There is a NYS bug. If a service is not available, the some NIS/NIS+ routines will give back a NULL pointer, but the other functions expect a *************** *** 19,38 **** so that the old XFree86 binaries will run fine with the new XFree86 shared librraries compiled with libc 6.x/glibc 2.x. ! If you use linux 2.1.x, you need libc 5.4.24 or above to compile libc yourself. The pre-compiled libc should run fine under linux 2.1.x. Also this library is compiled with -D_REENTRANT so that errno is MT safe. The shared libraries are now compiled with -g1 which can provide minimum information when core dump happens. You can strip ! libc.so.5.4.24 if you want. ! Due to the new, improved locale, the Linux C library 5.4.24 is binary compatible with libc 5.3.12 but not vice versa. The binaries ! compiled/linked with libc.so.5.4.24 may not run with libc.so.5.3.12. You may need to regenerate locale files for the new locale in libc ! 5.4.24 if you use locales other tha C/POSIX which are the defaults. The locale sources are at --- 29,48 ---- so that the old XFree86 binaries will run fine with the new XFree86 shared librraries compiled with libc 6.x/glibc 2.x. ! If you use linux 2.1.x, you need libc 5.4.25 or above to compile libc yourself. The pre-compiled libc should run fine under linux 2.1.x. Also this library is compiled with -D_REENTRANT so that errno is MT safe. The shared libraries are now compiled with -g1 which can provide minimum information when core dump happens. You can strip ! libc.so.5.4.25 if you want. ! Due to the new, improved locale, the Linux C library 5.4.25 is binary compatible with libc 5.3.12 but not vice versa. The binaries ! compiled/linked with libc.so.5.4.25 may not run with libc.so.5.3.12. You may need to regenerate locale files for the new locale in libc ! 5.4.25 if you use locales other tha C/POSIX which are the defaults. The locale sources are at *************** *** 41,47 **** There are many security bug fixes. Please consult ChangeLog for details. Please let me know if there are more security bugs remains. ! This is the beta release of the Linux C library 5.4.24. Please read the ChangeLog for details regarding changes/bug fixes. DISTRIBUTION SITES: --- 51,57 ---- There are many security bug fixes. Please consult ChangeLog for details. Please let me know if there are more security bugs remains. ! This is the beta release of the Linux C library 5.4.25. Please read the ChangeLog for details regarding changes/bug fixes. DISTRIBUTION SITES: *************** *** 62,72 **** DISTRIBUTION FILES: ! 1. libc-5.4.24.bin.tar.gz REQUIRED. This package contains the header files for libc, shared and static ELF libraries libc and libm, and the static ELF library libbsd.a. ! The header files in libc-5.4.24.bin.tar.gz are not complete. You need to install the kernel source tree for the system-dependent header files. The header files are in lib-x.y.z.bin.tar.gz and libc-x.y.z.tar.gz. You --- 72,82 ---- DISTRIBUTION FILES: ! 1. libc-5.4.25.bin.tar.gz REQUIRED. This package contains the header files for libc, shared and static ELF libraries libc and libm, and the static ELF library libbsd.a. ! The header files in libc-5.4.25.bin.tar.gz are not complete. You need to install the kernel source tree for the system-dependent header files. The header files are in lib-x.y.z.bin.tar.gz and libc-x.y.z.tar.gz. You *************** *** 77,87 **** to extract the header files without the binaries files. A separate tar file for the header files may cause unnecessary confusion. ! 2. libc-5.4.24.tar.gz Source tree for libc and header files. ! 3. libc-5.4.23-5.4.24.diff.gz Context diffs against the source tree from the previous libc release. Please make sure the empty libc/regex/rx.h is deleted. --- 87,97 ---- to extract the header files without the binaries files. A separate tar file for the header files may cause unnecessary confusion. ! 2. libc-5.4.25.tar.gz Source tree for libc and header files. ! 3. libc-5.4.23-5.4.25.diff.gz Context diffs against the source tree from the previous libc release. Please make sure the empty libc/regex/rx.h is deleted. *************** *** 152,158 **** rm -f /usr/include/wcstr.h /usr/include/mbstr.h rm -f /usr/include/ld_so_config.h /usr/include/localeinfo.h rm -rf /usr/include/netinet /usr/include/net /usr/include/pthread ! gzip -dc libc-5.4.24.bin.tar.gz | tar xvf - SOURCE INSTALLATION: --- 162,168 ---- rm -f /usr/include/wcstr.h /usr/include/mbstr.h rm -f /usr/include/ld_so_config.h /usr/include/localeinfo.h rm -rf /usr/include/netinet /usr/include/net /usr/include/pthread ! gzip -dc libc-5.4.25.bin.tar.gz | tar xvf - SOURCE INSTALLATION: *************** *** 179,186 **** new libc.so* to /lib, do "ldconfig -v", reboot, then do "make install" A dirent bug, which erroneously defined d->reclen to d->namlen if USE_GNU ! was defined, has been fixed. Unfortunately, some GNU packages depend on ! this bug. GNU make 3.xx is one of them. A patch is included here. A back door has been added for the file descriptor in DIR. You need to define DIRENT_ILLEGAL_ACCESS to access the dd_fd field. You should use --- 189,195 ---- new libc.so* to /lib, do "ldconfig -v", reboot, then do "make install" A dirent bug, which erroneously defined d->reclen to d->namlen if USE_GNU ! was defined, has been fixed. A back door has been added for the file descriptor in DIR. You need to define DIRENT_ILLEGAL_ACCESS to access the dd_fd field. You should use *************** *** 219,268 **** H.J. hjl@gnu.ai.mit.edu ! 03/14/97 ! ---- ! RCS file: /home/cvs/gnu/make/dir.c,v ! retrieving revision 1.1.1.1 ! diff -c -r1.1.1.1 dir.c ! *** 1.1.1.1 1995/06/25 03:27:16 ! --- dir.c 1995/06/25 03:55:22 ! *************** ! *** 20,26 **** ! ! #if defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__) ! #include ! ! #ifndef __GNU_LIBRARY__ ! #define D_NAMLEN(d) strlen((d)->d_name) ! #else /* GNU C library. */ ! #define D_NAMLEN(d) ((d)->d_namlen) ! --- 20,26 ---- ! ! #if defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__) ! #include ! ! #ifndef __BAD_GNU_LIBRARY__ ! #define D_NAMLEN(d) strlen((d)->d_name) ! #else /* GNU C library. */ ! #define D_NAMLEN(d) ((d)->d_namlen) ! =================================================================== ! RCS file: /home/cvs/gnu/make/glob/glob.c,v ! retrieving revision 1.1.1.1 ! diff -c -r1.1.1.1 glob.c ! *** 1.1.1.1 1995/06/25 03:27:18 ! --- glob/glob.c 1995/06/25 03:56:01 ! *************** ! *** 64,70 **** ! ! #if defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__) ! #include ! ! #ifndef __GNU_LIBRARY__ ! #define D_NAMLEN(d) strlen((d)->d_name) ! #else /* GNU C library. */ ! #define D_NAMLEN(d) ((d)->d_namlen) ! --- 64,70 ---- ! ! #if defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__) ! #include ! ! #ifndef __BAD_GNU_LIBRARY__ ! #define D_NAMLEN(d) strlen((d)->d_name) ! #else /* GNU C library. */ ! #define D_NAMLEN(d) ((d)->d_namlen) --- 228,231 ---- H.J. hjl@gnu.ai.mit.edu ! 03/24/97 Index: linux/libc/bsd/setenv.c diff -c linux/libc/bsd/setenv.c:1.3 linux/libc/bsd/setenv.c:1.4 *** linux/libc/bsd/setenv.c:1.3 Tue Mar 12 21:08:10 1996 --- linux/libc/bsd/setenv.c Sun Mar 23 14:29:17 1997 *************** *** 115,123 **** goto do_return; } *ep = new; } - memcpy (*ep, name, namelen); - (*ep)[namelen] = '='; memcpy (&(*ep)[namelen + 1], value, vallen + 1); } --- 115,123 ---- goto do_return; } *ep = new; + memcpy (*ep, name, namelen); + (*ep)[namelen] = '='; } memcpy (&(*ep)[namelen + 1], value, vallen + 1); } Index: linux/libc/dl-malloc/malloc.c diff -c linux/libc/dl-malloc/malloc.c:1.10 linux/libc/dl-malloc/malloc.c:1.11 *** linux/libc/dl-malloc/malloc.c:1.10 Fri Feb 14 19:38:14 1997 --- linux/libc/dl-malloc/malloc.c Sun Mar 23 14:29:18 1997 *************** *** 851,856 **** --- 851,858 ---- #define mALLOC_TRIm __malloc_trim #define mALLOC_USABLE_SIZe __malloc_usable_size #define mALLOC_STATs __malloc_stats + #define mALLOC_GET_STATe __malloc_get_state + #define mALLOC_SET_STATe __malloc_set_state #pragma weak calloc = __libc_calloc #pragma weak free = __libc_free *************** *** 865,870 **** --- 867,874 ---- #pragma weak malloc_trim = __malloc_trim #pragma weak malloc_usable_size = __malloc_usable_size #pragma weak malloc_stats = __malloc_stats + #pragma weak malloc_get_state = __malloc_get_state + #pragma weak malloc_set_state = __malloc_set_state #else *************** *** 880,885 **** --- 884,891 ---- #define mALLOC_TRIm malloc_trim #define mALLOC_USABLE_SIZe malloc_usable_size #define mALLOC_STATs malloc_stats + #define mALLOC_GET_STATe malloc_get_state + #define mALLOC_SET_STATe malloc_set_state #endif *************** *** 900,905 **** --- 906,913 ---- void mALLOC_STATs(); int mALLOPt(int, int); struct mallinfo mALLINFo(void); + Void_t* mALLOC_GET_STATe(void); + int mALLOC_SET_STATe(Void_t*); #if defined(MALLOC_HOOKS) /* Hooks for debugging versions. */ *************** *** 927,932 **** --- 935,942 ---- void mALLOC_STATs(); int mALLOPt(); struct mallinfo mALLINFo(); + Void_t* mALLOC_GET_STATe(); + int mALLOC_SET_STATe(); #if defined(MALLOC_HOOKS) /* Hooks for debugging versions. */ *************** *** 3187,3192 **** --- 3197,3323 ---- + /* Get/set state: malloc_get_state() records the current state of all + malloc variables (_except_ for the actual heap contents and `hook' + function pointers) in a system dependent, opaque data structure. + This data structure is dynamically allocated and can be free()d + after use. malloc_set_state() restores the state of all malloc + variables to the previously obtained state. This is especially + useful when using this malloc as part of a shared library, and when + the heap contents are saved/restored via some other method. The + primary example for this is GNU Emacs with its `dumping' procedure. + `Hook' function pointers are never saved or restored by these + functions. */ + + #define MALLOC_STATE_MAGIC 0x444c4541l + #define MALLOC_STATE_VERSION (0*0x100l + 0l) /* major*0x100 + minor */ + + struct malloc_state { + long magic; + long version; + mbinptr av[NAV * 2 + 2]; + char* sbrk_base; + int sbrked_mem_bytes; + unsigned long trim_threshold; + unsigned long top_pad; + unsigned int n_mmaps_max; + unsigned long mmap_threshold; + int check_action; + unsigned long max_sbrked_mem; + unsigned long max_total_mem; + unsigned int n_mmaps; + unsigned int max_n_mmaps; + unsigned long mmapped_mem; + unsigned long max_mmapped_mem; + }; + + Void_t* + mALLOC_GET_STATe() + { + struct malloc_state* ms; + int i; + mbinptr b; + + ms = (struct malloc_state*)mALLOc(sizeof(*ms)); + if(!ms) return 0; + ms->magic = MALLOC_STATE_MAGIC; + ms->version = MALLOC_STATE_VERSION; + ms->av[0] = av_[0]; + ms->av[1] = av_[1]; + for(i=0; iav[2*i+2] = ms->av[2*i+3] = 0; /* empty bin (or initial top) */ + else { + ms->av[2*i+2] = first(b); + ms->av[2*i+3] = last(b); + } + } + ms->sbrk_base = sbrk_base; + ms->sbrked_mem_bytes = sbrked_mem; + ms->trim_threshold = trim_threshold; + ms->top_pad = top_pad; + ms->n_mmaps_max = n_mmaps_max; + ms->mmap_threshold = mmap_threshold; + ms->check_action = check_action; + ms->max_sbrked_mem = max_sbrked_mem; + ms->max_total_mem = max_total_mem; + ms->n_mmaps = n_mmaps; + ms->max_n_mmaps = max_n_mmaps; + ms->mmapped_mem = mmapped_mem; + ms->max_mmapped_mem = max_mmapped_mem; + return (Void_t*)ms; + } + + int + #if __STD_C + mALLOC_SET_STATe(Void_t* msptr) + #else + mALLOC_SET_STATe(msptr) Void_t* msptr; + #endif + { + struct malloc_state* ms = (struct malloc_state*)msptr; + int i; + mbinptr b; + + if(ms->magic != MALLOC_STATE_MAGIC) return -1; + /* Must fail if the major version is too high. */ + if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2; + av_[0] = ms->av[0]; + av_[1] = ms->av[1]; + for(i=0; iav[2*i+2] == 0) + first(b) = last(b) = b; + else { + first(b) = ms->av[2*i+2]; + last(b) = ms->av[2*i+3]; + if(i > 0) { + /* Make sure the links to the av_-bins in the heap are correct. */ + first(b)->bk = b; + last(b)->fd = b; + } + } + } + sbrk_base = ms->sbrk_base; + sbrked_mem = ms->sbrked_mem_bytes; + trim_threshold = ms->trim_threshold; + top_pad = ms->top_pad; + n_mmaps_max = ms->n_mmaps_max; + mmap_threshold = ms->mmap_threshold; + check_action = ms->check_action; + max_sbrked_mem = ms->max_sbrked_mem; + max_total_mem = ms->max_total_mem; + n_mmaps = ms->n_mmaps; + max_n_mmaps = ms->max_n_mmaps; + mmapped_mem = ms->mmapped_mem; + max_mmapped_mem = ms->max_mmapped_mem; + /* add version-dependent code here */ + return 0; + } + + + /* Malloc hooks: When compiling with MALLOC_HOOKS defined, all calls to malloc(), realloc(), free() and memalign() are routed through the global function pointers __malloc_hook, __realloc_hook, *************** *** 3210,3215 **** --- 3341,3351 ---- /* Already initialized? */ int __libc_malloc_initialized = 0; + #if !__STDC + char* getenv(); + int atoi(); + #endif + /* Initialization routine. */ static void malloc_init () *************** *** 3218,3223 **** --- 3354,3367 ---- if(__libc_malloc_initialized) return; __libc_malloc_initialized = 1; + if((s = getenv("MALLOC_TRIM_THRESHOLD_"))) + mALLOPt(M_TRIM_THRESHOLD, atoi(s)); + if((s = getenv("MALLOC_TOP_PAD_"))) + mALLOPt(M_TOP_PAD, atoi(s)); + if((s = getenv("MALLOC_MMAP_THRESHOLD_"))) + mALLOPt(M_MMAP_THRESHOLD, atoi(s)); + if((s = getenv("MALLOC_MMAP_MAX_"))) + mALLOPt(M_MMAP_MAX, atoi(s)); s = getenv("MALLOC_CHECK_"); if(s) { if(s[0]) mALLOPt(M_CHECK_ACTION, (int)(s[0] - '0')); Index: linux/libc/elf/libc/jump.params diff -c linux/libc/elf/libc/jump.params:1.77 linux/libc/elf/libc/jump.params:1.78 *** linux/libc/elf/libc/jump.params:1.77 Fri Mar 14 20:03:02 1997 --- linux/libc/elf/libc/jump.params Sun Mar 23 14:29:19 1997 *************** *** 1 **** ! Version=5.4.24 --- 1 ---- ! Version=5.4.25 Index: linux/libc/nys/yp/src/yp.h diff -c linux/libc/nys/yp/src/yp.h:1.3 linux/libc/nys/yp/src/yp.h:removed *** linux/libc/nys/yp/src/yp.h:1.3 Sat Jun 10 17:19:46 1995 --- linux/libc/nys/yp/src/yp.h Mon Mar 24 17:44:10 1997 *************** *** 1,288 **** - #define YPMAXRECORD 1024 - #define YPMAXDOMAIN 64 - #define YPMAXMAP 64 - #define YPMAXPEER 64 - - enum ypstat { - YP_TRUE = 1, - YP_NOMORE = 2, - YP_FALSE = 0, - YP_NOMAP = -1, - YP_NODOM = -2, - YP_NOKEY = -3, - YP_BADOP = -4, - YP_BADDB = -5, - YP_YPERR = -6, - YP_BADARGS = -7, - YP_VERS = -8, - }; - typedef enum ypstat ypstat; - bool_t xdr_ypstat(XDR *, ypstat*); - - - enum ypxfrstat { - YPXFR_SUCC = 1, - YPXFR_AGE = 2, - YPXFR_NOMAP = -1, - YPXFR_NODOM = -2, - YPXFR_RSRC = -3, - YPXFR_RPC = -4, - YPXFR_MADDR = -5, - YPXFR_YPERR = -6, - YPXFR_BADARGS = -7, - YPXFR_DBM = -8, - YPXFR_FILE = -9, - YPXFR_SKEW = -10, - YPXFR_CLEAR = -11, - YPXFR_FORCE = -12, - YPXFR_XFRERR = -13, - YPXFR_REFUSED = -14, - }; - typedef enum ypxfrstat ypxfrstat; - bool_t xdr_ypxfrstat(XDR *, ypxfrstat*); - - - typedef char *domainname; - bool_t xdr_domainname(XDR *, char *); - - - typedef char *mapname; - bool_t xdr_mapname(XDR *, mapname*); - - - typedef char *peername; - bool_t xdr_peername(XDR *, peername*); - - - typedef struct { - u_int keydat_len; - char *keydat_val; - } keydat; - bool_t xdr_keydat(XDR *, keydat*); - - - typedef struct { - u_int valdat_len; - char *valdat_val; - } valdat; - bool_t xdr_valdat(XDR *, valdat*); - - - struct ypmap_parms { - domainname domain; - mapname map; - u_int ordernum; - peername peer; - }; - typedef struct ypmap_parms ypmap_parms; - bool_t xdr_ypmap_parms(XDR *, ypmap_parms*); - - - struct ypreq_key { - domainname domain; - mapname map; - keydat key; - }; - typedef struct ypreq_key ypreq_key; - bool_t xdr_ypreq_key(XDR *, ypreq_key*); - - - struct ypreq_nokey { - domainname domain; - mapname map; - }; - typedef struct ypreq_nokey ypreq_nokey; - bool_t xdr_ypreq_nokey(XDR *, ypreq_nokey*); - - - struct ypreq_xfr { - ypmap_parms map_parms; - u_int transid; - u_int prog; - u_int port; - }; - typedef struct ypreq_xfr ypreq_xfr; - bool_t xdr_ypreq_xfr(XDR *, ypreq_xfr*); - - - struct ypresp_val { - ypstat stat; - valdat val; - }; - typedef struct ypresp_val ypresp_val; - bool_t xdr_ypresp_val(XDR *, ypresp_val*); - - - struct ypresp_key_val { - ypstat stat; - valdat val; - keydat key; - }; - typedef struct ypresp_key_val ypresp_key_val; - bool_t xdr_ypresp_key_val(XDR *, ypresp_key_val*); - - - struct ypresp_master { - ypstat stat; - peername peer; - }; - typedef struct ypresp_master ypresp_master; - bool_t xdr_ypresp_master(XDR *, ypresp_master*); - - - struct ypresp_order { - ypstat stat; - u_int ordernum; - }; - typedef struct ypresp_order ypresp_order; - bool_t xdr_ypresp_order(XDR *, ypresp_order*); - - - struct ypresp_all { - bool_t more; - union { - ypresp_key_val val; - } ypresp_all_u; - }; - typedef struct ypresp_all ypresp_all; - bool_t xdr_ypresp_all(XDR *, ypresp_all*); - - - struct ypresp_xfr { - u_int transid; - ypxfrstat xfrstat; - }; - typedef struct ypresp_xfr ypresp_xfr; - bool_t xdr_ypresp_xfr(XDR *, ypresp_xfr*); - - - struct ypmaplist { - mapname map; - struct ypmaplist *next; - }; - typedef struct ypmaplist ypmaplist; - bool_t xdr_ypmaplist(XDR *, ypmaplist*); - - - struct ypresp_maplist { - ypstat stat; - ypmaplist *maps; - }; - typedef struct ypresp_maplist ypresp_maplist; - bool_t xdr_ypresp_maplist(XDR *, ypresp_maplist*); - - - enum yppush_status { - YPPUSH_SUCC = 1, - YPPUSH_AGE = 2, - YPPUSH_NOMAP = -1, - YPPUSH_NODOM = -2, - YPPUSH_RSRC = -3, - YPPUSH_RPC = -4, - YPPUSH_MADDR = -5, - YPPUSH_YPERR = -6, - YPPUSH_BADARGS = -7, - YPPUSH_DBM = -8, - YPPUSH_FILE = -9, - YPPUSH_SKEW = -10, - YPPUSH_CLEAR = -11, - YPPUSH_FORCE = -12, - YPPUSH_XFRERR = -13, - YPPUSH_REFUSED = -14, - }; - typedef enum yppush_status yppush_status; - bool_t xdr_yppush_status(XDR *, yppush_status*); - - - struct yppushresp_xfr { - u_int transid; - yppush_status status; - }; - typedef struct yppushresp_xfr yppushresp_xfr; - bool_t xdr_yppushresp_xfr(XDR *, yppushresp_xfr*); - - - enum ypbind_resptype { - YPBIND_SUCC_VAL = 1, - YPBIND_FAIL_VAL = 2, - }; - typedef enum ypbind_resptype ypbind_resptype; - bool_t xdr_ypbind_resptype(XDR *, ypbind_resptype*); - - - struct ypbind_binding { - char ypbind_binding_addr[4]; - char ypbind_binding_port[2]; - }; - typedef struct ypbind_binding ypbind_binding; - bool_t xdr_ypbind_binding(XDR *, ypbind_binding*); - - - struct ypbind_resp { - ypbind_resptype ypbind_status; - union { - u_int ypbind_error; - ypbind_binding ypbind_bindinfo; - } ypbind_resp_u; - }; - typedef struct ypbind_resp ypbind_resp; - bool_t xdr_ypbind_resp(XDR *, ypbind_resp*); - - #define YPBIND_ERR_ERR 1 - #define YPBIND_ERR_NOSERV 2 - #define YPBIND_ERR_RESC 3 - - struct ypbind_setdom { - domainname ypsetdom_domain; - ypbind_binding ypsetdom_binding; - u_int ypsetdom_vers; - }; - typedef struct ypbind_setdom ypbind_setdom; - bool_t xdr_ypbind_setdom(XDR *, ypbind_setdom*); - - - #define YPPROG ((u_long)100004) - #define YPVERS ((u_long)2) - #define YPPROC_NULL ((u_long)0) - extern void *ypproc_null_2(void *, CLIENT *); - #define YPPROC_DOMAIN ((u_long)1) - extern bool_t *ypproc_domain_2(domainname, CLIENT *); - #define YPPROC_DOMAIN_NONACK ((u_long)2) - extern bool_t *ypproc_domain_nonack_2(domainname, CLIENT *); - #define YPPROC_MATCH ((u_long)3) - extern ypresp_val *ypproc_match_2(ypreq_key *, CLIENT *); - #define YPPROC_FIRST ((u_long)4) - extern ypresp_key_val *ypproc_first_2(ypreq_key *, CLIENT *); - #define YPPROC_NEXT ((u_long)5) - extern ypresp_key_val *ypproc_next_2(ypreq_key *, CLIENT *); - #define YPPROC_XFR ((u_long)6) - extern ypresp_xfr *ypproc_xfr_2(ypreq_xfr *, CLIENT *); - #define YPPROC_CLEAR ((u_long)7) - extern void *ypproc_clear_2(void *, CLIENT *); - #define YPPROC_ALL ((u_long)8) - extern ypresp_all *ypproc_all_2(ypreq_nokey *, CLIENT *); - #define YPPROC_MASTER ((u_long)9) - extern ypresp_master *ypproc_master_2(ypreq_nokey *, CLIENT *); - #define YPPROC_ORDER ((u_long)10) - extern ypresp_order *ypproc_order_2(ypreq_nokey *, CLIENT *); - #define YPPROC_MAPLIST ((u_long)11) - extern ypresp_maplist *ypproc_maplist_2(domainname, CLIENT *); - - - #define YPPUSH_XFRRESPPROG ((u_long)0x40000000) - #define YPPUSH_XFRRESPVERS ((u_long)1) - #define YPPUSHPROC_NULL ((u_long)0) - extern void *yppushproc_null_1(void *, CLIENT *); - #define YPPUSHPROC_XFRRESP ((u_long)1) - extern yppushresp_xfr *yppushproc_xfrresp_1(void *, CLIENT *); - - - #define YPBINDPROG ((u_long)100007) - #define YPBINDVERS ((u_long)2) - #define YPBINDPROC_NULL ((u_long)0) - extern void *ypbindproc_null_2(void *, CLIENT *); - #define YPBINDPROC_DOMAIN ((u_long)1) - extern ypbind_resp *ypbindproc_domain_2(domainname, CLIENT *); - #define YPBINDPROC_SETDOM ((u_long)2) - extern void *ypbindproc_setdom_2(ypbind_setdom *, CLIENT *); - --- 0 ---- Index: linux/libc/nys/yp/src/yp_clnt.c diff -c linux/libc/nys/yp/src/yp_clnt.c:1.3 linux/libc/nys/yp/src/yp_clnt.c:1.4 *** linux/libc/nys/yp/src/yp_clnt.c:1.3 Sat Jun 10 17:19:47 1995 --- linux/libc/nys/yp/src/yp_clnt.c Sun Mar 23 14:29:22 1997 *************** *** 3,9 **** #ifdef ENABLE_YPEMU #include ! #include "yp.h" /* Default timeout can be changed using clnt_control() */ --- 3,9 ---- #ifdef ENABLE_YPEMU #include ! #include /* Default timeout can be changed using clnt_control() */ *************** *** 23,29 **** bool_t * ! ypproc_domain_2(domainname argp, CLIENT *clnt) { static bool_t res; --- 23,29 ---- bool_t * ! ypproc_domain_2(domainname *argp, CLIENT *clnt) { static bool_t res; *************** *** 36,42 **** bool_t * ! ypproc_domain_nonack_2(domainname argp, CLIENT *clnt) { static bool_t res; --- 36,42 ---- bool_t * ! ypproc_domain_nonack_2(domainname *argp, CLIENT *clnt) { static bool_t res; *************** *** 142,148 **** ypresp_maplist * ! ypproc_maplist_2(domainname argp, CLIENT *clnt) { static ypresp_maplist res; --- 142,148 ---- ypresp_maplist * ! ypproc_maplist_2(domainname *argp, CLIENT *clnt) { static ypresp_maplist res; *************** *** 167,174 **** } ! yppushresp_xfr * ! yppushproc_xfrresp_1(void *argp, CLIENT *clnt) { static yppushresp_xfr res; --- 167,174 ---- } ! void * ! yppushproc_xfrresp_1(yppushresp_xfr *argp, CLIENT *clnt) { static yppushresp_xfr res; *************** *** 194,200 **** ypbind_resp * ! ypbindproc_domain_2(domainname argp, CLIENT *clnt) { static ypbind_resp res; --- 194,200 ---- ypbind_resp * ! ypbindproc_domain_2(domainname *argp, CLIENT *clnt) { static ypbind_resp res; Index: linux/libc/nys/yp/src/yp_conf.c diff -c linux/libc/nys/yp/src/yp_conf.c:1.4 linux/libc/nys/yp/src/yp_conf.c:1.5 *** linux/libc/nys/yp/src/yp_conf.c:1.4 Tue Jan 23 23:52:38 1996 --- linux/libc/nys/yp/src/yp_conf.c Sun Mar 23 14:29:23 1997 *************** *** 33,39 **** #include #include #include ! #include "yp.h" #include "yp_conf.h" struct yp_conf *_yp_config = NULL; --- 33,39 ---- #include #include #include ! #include #include "yp_conf.h" struct yp_conf *_yp_config = NULL; Index: linux/libc/nys/yp/src/yp_if.c diff -c linux/libc/nys/yp/src/yp_if.c:1.6 linux/libc/nys/yp/src/yp_if.c:1.7 *** linux/libc/nys/yp/src/yp_if.c:1.6 Fri Oct 4 15:53:07 1996 --- linux/libc/nys/yp/src/yp_if.c Sun Mar 23 14:29:23 1997 *************** *** 33,39 **** #include #include #include ! #include "yp.h" #include "yp_conf.h" #include "rpcsvc/ypclnt.h" #include --- 33,39 ---- #include #include #include ! #include #include "yp_conf.h" #include "rpcsvc/ypclnt.h" #include Index: linux/libc/nys/yp/src/yp_xdr.c diff -c linux/libc/nys/yp/src/yp_xdr.c:1.3 linux/libc/nys/yp/src/yp_xdr.c:1.4 *** linux/libc/nys/yp/src/yp_xdr.c:1.3 Sat Jun 10 17:19:47 1995 --- linux/libc/nys/yp/src/yp_xdr.c Sun Mar 23 14:29:23 1997 *************** *** 3,9 **** #ifdef ENABLE_YPEMU #include ! #include "yp.h" bool_t xdr_ypstat(XDR *xdrs, ypstat *objp) --- 3,9 ---- #ifdef ENABLE_YPEMU #include ! #include bool_t xdr_ypstat(XDR *xdrs, ypstat *objp) *************** *** 30,38 **** bool_t ! xdr_domainname(XDR *xdrs, domainname objp) { ! if (!xdr_string(xdrs, &objp, YPMAXDOMAIN)) { return (FALSE); } return (TRUE); --- 30,38 ---- bool_t ! xdr_domainname(XDR *xdrs, domainname *objp) { ! if (!xdr_string(xdrs, objp, YPMAXDOMAIN)) { return (FALSE); } return (TRUE); *************** *** 92,98 **** bool_t xdr_ypmap_parms(XDR *xdrs, ypmap_parms *objp) { ! if (!xdr_domainname(xdrs, objp->domain)) { return (FALSE); } if (!xdr_mapname(xdrs, &objp->map)) { --- 92,98 ---- bool_t xdr_ypmap_parms(XDR *xdrs, ypmap_parms *objp) { ! if (!xdr_domainname(xdrs, &objp->domain)) { return (FALSE); } if (!xdr_mapname(xdrs, &objp->map)) { *************** *** 113,119 **** bool_t xdr_ypreq_key(XDR *xdrs, ypreq_key *objp) { ! if (!xdr_domainname(xdrs, objp->domain)) { return (FALSE); } if (!xdr_mapname(xdrs, &objp->map)) { --- 113,119 ---- bool_t xdr_ypreq_key(XDR *xdrs, ypreq_key *objp) { ! if (!xdr_domainname(xdrs, &objp->domain)) { return (FALSE); } if (!xdr_mapname(xdrs, &objp->map)) { *************** *** 131,137 **** bool_t xdr_ypreq_nokey(XDR *xdrs, ypreq_nokey *objp) { ! if (!xdr_domainname(xdrs, objp->domain)) { return (FALSE); } if (!xdr_mapname(xdrs, &objp->map)) { --- 131,137 ---- bool_t xdr_ypreq_nokey(XDR *xdrs, ypreq_nokey *objp) { ! if (!xdr_domainname(xdrs, &objp->domain)) { return (FALSE); } if (!xdr_mapname(xdrs, &objp->map)) { *************** *** 377,383 **** bool_t xdr_ypbind_setdom(XDR *xdrs, ypbind_setdom *objp) { ! if (!xdr_domainname(xdrs, objp->ypsetdom_domain)) { return (FALSE); } if (!xdr_ypbind_binding(xdrs, &objp->ypsetdom_binding)) { --- 377,383 ---- bool_t xdr_ypbind_setdom(XDR *xdrs, ypbind_setdom *objp) { ! if (!xdr_domainname(xdrs, &objp->ypsetdom_domain)) { return (FALSE); } if (!xdr_ypbind_binding(xdrs, &objp->ypsetdom_binding)) { Index: linux/libc/posix/putenv.c diff -c linux/libc/posix/putenv.c:1.2 linux/libc/posix/putenv.c:1.3 *** linux/libc/posix/putenv.c:1.2 Fri Mar 14 20:03:06 1997 --- linux/libc/posix/putenv.c Sun Mar 23 14:29:23 1997 *************** *** 1,68 **** ! /* Copyright (C) 1991, 1994, 1995, 1996 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., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! #if defined (_AIX) && !defined (__GNUC__) ! #pragma alloca #endif - #if HAVE_CONFIG_H - # include - #endif - - #if _LIBC || HAVE_STDLIB_H - # include - #endif - #if _LIBC || HAVE_STRING_H - # include - #endif - - #if !__GNU_LIBRARY__ && !HAVE_STRCHR - # define strchr index - #endif - - #ifndef _LIBC - # ifdef HAVE_ALLOCA_H - # include - # else - # ifdef __GNUC__ - # define alloca __builtin_alloca - # else - extern char *alloca (); - # endif /* __GNUC__ */ - # endif /* HAVE_ALLOCA_H */ - #endif /* _LIBC */ - - /* Put STRING, which is of the form "NAME=VALUE", in the environment. */ int ! putenv (string) ! const char *string; { ! const char *const name_end = strchr (string, '='); ! if (name_end) { ! char *name = alloca (name_end - string + 1); ! memcpy (name, string, name_end - string); ! name[name_end - string] = '\0'; ! return setenv (name, name_end + 1, 1); } - unsetenv (string); return 0; } --- 1,80 ---- ! /* Copyright (C) 1991 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. */ ! ! #include ! #include ! #include ! #include ! #include ! #if !defined(HAVE_GNU_LD) && !defined (__ELF__) ! #define __environ environ #endif /* Put STRING, which is of the form "NAME=VALUE", in the environment. */ int ! DEFUN(putenv, (string), CONST char *string) { ! CONST char *CONST name_end = strchr(string, '='); ! register size_t size; ! register char **ep; ! ! if (name_end == NULL) ! { ! /* Remove the variable from the environment. */ ! size = strlen(string); ! for (ep = __environ; *ep != NULL; ++ep) ! if (!strncmp(*ep, string, size) && (*ep)[size] == '=') ! { ! while (ep[1] != NULL) ! { ! ep[0] = ep[1]; ! ++ep; ! } ! *ep = NULL; ! return 0; ! } ! } ! ! size = 0; ! for (ep = __environ; *ep != NULL; ++ep) ! if (!strncmp(*ep, string, name_end - string) && ! (*ep)[name_end - string] == '=') ! break; ! else ! ++size; ! if (*ep == NULL) { ! static char **last_environ = NULL; ! char **new_environ = (char **) malloc((size + 2) * sizeof(char *)); ! if (new_environ == NULL) ! return -1; ! (void) memcpy((PTR) new_environ, (PTR) __environ, size * sizeof(char *)); ! new_environ[size] = (char *) string; ! new_environ[size + 1] = NULL; ! if (last_environ != NULL) ! free((PTR) last_environ); ! last_environ = new_environ; ! __environ = new_environ; } + else + *ep = (char *) string; return 0; } Index: linux/libc/sysdeps/linux/readv.c diff -c linux/libc/sysdeps/linux/readv.c:1.5 linux/libc/sysdeps/linux/readv.c:1.6 *** linux/libc/sysdeps/linux/readv.c:1.5 Fri Oct 4 15:53:28 1996 --- linux/libc/sysdeps/linux/readv.c Mon Mar 24 17:37:34 1997 *************** *** 33,42 **** --- 33,49 ---- int __readv( int, const struct iovec *, size_t); + /* Not all versions of the kernel support the large number of records. + */ + #ifndef UIO_FASTIOV + # define UIO_FASTIOV 8 /* 8 is a safe number. */ + #endif + int DEFUN(__readv, (fd, vector, count), int fd AND CONST struct iovec *vector AND size_t count) { + int errno_saved = errno; char *buffer; size_t bytes; int bytes_read; *************** *** 44,68 **** /* We try the system call first. */ #define min(a, b) ((a) > (b) ? (b) : (a)) - #ifdef MAX_IOVEC - for (i = 0, bytes = 0; i < count; i += MAX_IOVEC, bytes += bytes_read) { - bytes_read = __syscall_readv (fd, vector+i, min(count-i,MAX_IOVEC)); - if (bytes_read < 0) { - if (errno != ENOSYS) return bytes_read; - else goto nonsyscall; /* probably shouldn't happen */ - } - } - return bytes; - nonsyscall: - #else /* this probably means syscall doesn't exist, but just in case... */ bytes_read = __syscall_readv (fd, vector, count); ! if (bytes_read >= 0 || (bytes_read < 0 && errno != ENOSYS)) { return bytes_read; } - #endif ! errno = 0; /* Find the total number of bytes to be read. */ bytes = 0; --- 51,64 ---- /* We try the system call first. */ #define min(a, b) ((a) > (b) ? (b) : (a)) bytes_read = __syscall_readv (fd, vector, count); ! if (bytes_read >= 0 || ! (errno != ENOSYS && (errno != EINVAL || count <= UIO_FASTIOV))) { return bytes_read; } ! errno = errno_saved; /* Find the total number of bytes to be read. */ bytes = 0; Index: linux/libc/sysdeps/linux/writev.c diff -c linux/libc/sysdeps/linux/writev.c:1.8 linux/libc/sysdeps/linux/writev.c:1.9 *** linux/libc/sysdeps/linux/writev.c:1.8 Fri Oct 4 15:53:29 1996 --- linux/libc/sysdeps/linux/writev.c Mon Mar 24 17:37:34 1997 *************** *** 33,42 **** --- 33,49 ---- int __writev( int, const struct iovec *, size_t); + /* Not all versions of the kernel support the large number of records. + */ + #ifndef UIO_FASTIOV + # define UIO_FASTIOV 8 /* 8 is a safe number. */ + #endif + int DEFUN(__writev, (fd, vector, count), int fd AND CONST struct iovec *vector AND size_t count) { + int errno_saved = errno; char *buffer; register char *bp; size_t bytes, to_copy; *************** *** 45,73 **** /* We try the system call first. */ #define min(a, b) ((a) > (b) ? (b) : (a)) - #ifdef MAX_IOVEC - for (i = 0, bytes = 0; i < count; i += MAX_IOVEC, bytes += bytes_write) { - bytes_write = __syscall_writev (fd, vector+i, min(count-i,MAX_IOVEC)); - if (bytes_write < 0) - { - if (bytes > 0) - return bytes; - if (errno == ENOSYS) - goto nonsyscall; /* probably shouldn't happen */ - return bytes_write; - } - } - return bytes; - nonsyscall: - #else /* this probably means syscall doesn't exist, but just in case... */ bytes_write = __syscall_writev (fd, vector, count); ! if (bytes_write >= 0 || (bytes_write < 0 && errno != ENOSYS)) { return bytes_write; } - #endif ! errno = 0; /* Find the total number of bytes to be written. */ bytes = 0; --- 52,65 ---- /* We try the system call first. */ #define min(a, b) ((a) > (b) ? (b) : (a)) bytes_write = __syscall_writev (fd, vector, count); ! if (bytes_write >= 0 || ! (errno != ENOSYS && (errno != EINVAL || count <= UIO_FASTIOV))) { return bytes_write; } ! errno = errno_saved; /* Find the total number of bytes to be written. */ bytes = 0; Index: linux/include/_G_config.h diff -c linux/include/_G_config.h:1.83 linux/include/_G_config.h:1.84 *** linux/include/_G_config.h:1.83 Fri Mar 14 20:03:44 1997 --- linux/include/_G_config.h Sun Mar 23 14:25:47 1997 *************** *** 2,11 **** #ifndef _G_config_h #define _G_config_h ! #define _LINUX_C_LIB_VERSION "5.4.24" #define _LINUX_C_LIB_VERSION_MAJOR 5 #define _LINUX_C_LIB_VERSION_MINOR 4 ! #define _LINUX_C_LIB_VERSION_SUBMINOR 24 #define _G_LIB_VERSION "2.7.2" --- 2,11 ---- #ifndef _G_config_h #define _G_config_h ! #define _LINUX_C_LIB_VERSION "5.4.25" #define _LINUX_C_LIB_VERSION_MAJOR 5 #define _LINUX_C_LIB_VERSION_MINOR 4 ! #define _LINUX_C_LIB_VERSION_SUBMINOR 25 #define _G_LIB_VERSION "2.7.2" Index: linux/include/malloc.h diff -c linux/include/malloc.h:1.6 linux/include/malloc.h:1.7 *** linux/include/malloc.h:1.6 Fri Feb 14 19:37:18 1997 --- linux/include/malloc.h Sun Mar 23 14:25:47 1997 *************** *** 116,130 **** struct mallinfo { int arena; /* total space allocated from system */ ! int ordblks; /* number of available chunks */ int smblks; /* unused -- always zero */ ! int hblks; /* unused -- always zero */ ! int hblkhd; /* unused -- always zero */ int usmblks; /* unused -- always zero */ int fsmblks; /* unused -- always zero */ int uordblks; /* total allocated space */ ! int fordblks; /* available (unallocated) space */ ! int keepcost; /* unused -- always zero */ }; extern struct mallinfo mallinfo __P((void)); --- 116,130 ---- struct mallinfo { int arena; /* total space allocated from system */ ! int ordblks; /* number of non-inuse chunks */ int smblks; /* unused -- always zero */ ! int hblks; /* number of mmapped regions */ ! int hblkhd; /* total space in mmapped regions */ int usmblks; /* unused -- always zero */ int fsmblks; /* unused -- always zero */ int uordblks; /* total allocated space */ ! int fordblks; /* total non-inuse space */ ! int keepcost; /* top-most, releasable (via malloc_trim) space */ }; extern struct mallinfo mallinfo __P((void)); *************** *** 144,149 **** --- 144,156 ---- #define M_MMAP_MAX -4 #endif + /* Record the state of all malloc variables in an opaque data structure. */ + extern void * malloc_get_state __P ((void)); + + /* Restore the state of all malloc variables from data obtained with + malloc_get_state(). */ + extern int malloc_set_state __P ((void * __ptr)); + __END_DECLS Index: linux/include/paths.h diff -c linux/include/paths.h:1.5 linux/include/paths.h:1.6 *** linux/include/paths.h:1.5 Tue Dec 17 08:24:15 1996 --- linux/include/paths.h Sun Mar 23 14:25:47 1997 *************** *** 43,49 **** #endif /* Default search path. */ ! #define _PATH_DEFPATH "/usr/local/bin:/usr/bin:/bin:." #define _PATH_DEFPATH_ROOT "/sbin:/bin:/usr/sbin:/usr/bin" #define _PATH_BSHELL "/bin/sh" --- 43,49 ---- #endif /* Default search path. */ ! #define _PATH_DEFPATH "/usr/local/bin:/usr/bin:/bin" #define _PATH_DEFPATH_ROOT "/sbin:/bin:/usr/sbin:/usr/bin" #define _PATH_BSHELL "/bin/sh"