mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
1999-09-24 Andreas Jaeger <aj@suse.de> * stdio-common/tst-printf.c (main): Add a testcase for large precision. Reported by Tymm Twillman <tymm@coe.missouri.edu>. 1999-09-24 Andreas Schwab <schwab@suse.de> * math/bits/mathcalls.h: Fix last change. Also declare __finite. 1999-09-24 Andreas Jaeger <aj@suse.de> * intl/finddomain.c (_nl_find_domain): Fix memory leak: Free normalized_codeset. Reported by Belicky Zsolt <zsolt@prolan.hu>. 1999-09-23 Mark Kettenis <kettenis@gnu.org> * sysdeps/unix/sysv/linux/Makefile [malloc] (CFLAGS-malloc.c): New variable. Define MORECORE_CLEARS to 2. * malloc/malloc.c (cALLOc): Correctly handle systems where sbrk doesn't clear the contents of memory that is reallocated after decrementing the break value first. Update comment about MORECORE_CLEARS, explaining the meaning of the values it can be set to.
This commit is contained in:
27
ChangeLog
27
ChangeLog
@ -1,3 +1,28 @@
|
|||||||
|
1999-09-24 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
* stdio-common/tst-printf.c (main): Add a testcase for large
|
||||||
|
precision. Reported by Tymm Twillman <tymm@coe.missouri.edu>.
|
||||||
|
|
||||||
|
1999-09-24 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* math/bits/mathcalls.h: Fix last change. Also declare __finite.
|
||||||
|
|
||||||
|
1999-09-24 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
* intl/finddomain.c (_nl_find_domain): Fix memory leak: Free
|
||||||
|
normalized_codeset. Reported by Belicky Zsolt <zsolt@prolan.hu>.
|
||||||
|
|
||||||
|
1999-09-23 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/Makefile [malloc] (CFLAGS-malloc.c): New
|
||||||
|
variable. Define MORECORE_CLEARS to 2.
|
||||||
|
|
||||||
|
* malloc/malloc.c (cALLOc): Correctly handle systems where sbrk
|
||||||
|
doesn't clear the contents of memory that is reallocated after
|
||||||
|
decrementing the break value first. Update comment about
|
||||||
|
MORECORE_CLEARS, explaining the meaning of the values it can be
|
||||||
|
set to.
|
||||||
|
|
||||||
1999-09-23 Ulrich Drepper <drepper@cygnus.com>
|
1999-09-23 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
* nis/nss_compat/compat-pwd.c (internal_getpwuid_r): Set errno in
|
* nis/nss_compat/compat-pwd.c (internal_getpwuid_r): Set errno in
|
||||||
@ -13,7 +38,7 @@
|
|||||||
|
|
||||||
* stdio-common/tstscanf.c (main): Add test case from PR libc/1313
|
* stdio-common/tstscanf.c (main): Add test case from PR libc/1313
|
||||||
reported by Ben Caradoc-Davies <bmcd@physics.otago.ac.nz>.
|
reported by Ben Caradoc-Davies <bmcd@physics.otago.ac.nz>.
|
||||||
|
|
||||||
1999-09-22 Andreas Schwab <schwab@suse.de>
|
1999-09-22 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
* stdio-common/vfscanf.c: Fix width handling when scanning floats.
|
* stdio-common/vfscanf.c: Fix width handling when scanning floats.
|
||||||
|
@ -191,6 +191,10 @@ _nl_find_domain (dirname, locale, domainname)
|
|||||||
if (alias_value != NULL)
|
if (alias_value != NULL)
|
||||||
free (locale);
|
free (locale);
|
||||||
|
|
||||||
|
/* The space for normalized_codeset is dynamically allocated. Free it. */
|
||||||
|
if (mask & XPG_NORM_CODESET)
|
||||||
|
free (normalized_codeset);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,8 +226,12 @@
|
|||||||
MORECORE_FAILURE (default: -1)
|
MORECORE_FAILURE (default: -1)
|
||||||
The value returned upon failure of MORECORE.
|
The value returned upon failure of MORECORE.
|
||||||
MORECORE_CLEARS (default 1)
|
MORECORE_CLEARS (default 1)
|
||||||
True (1) if the routine mapped to MORECORE zeroes out memory (which
|
The degree to which the routine mapped to MORECORE zeroes out
|
||||||
holds for sbrk).
|
memory: never (0), only for newly allocated space (1) or always
|
||||||
|
(2). The distinction between (1) and (2) is necessary because on
|
||||||
|
some systems, if the application first decrements and then
|
||||||
|
increments the break value, the contents of the reallocated space
|
||||||
|
are unspecified.
|
||||||
DEFAULT_TRIM_THRESHOLD
|
DEFAULT_TRIM_THRESHOLD
|
||||||
DEFAULT_TOP_PAD
|
DEFAULT_TOP_PAD
|
||||||
DEFAULT_MMAP_THRESHOLD
|
DEFAULT_MMAP_THRESHOLD
|
||||||
@ -861,11 +865,15 @@ Void_t *(*__morecore)() = __default_morecore;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static size_t __libc_pagesize;
|
|
||||||
|
|
||||||
#define MORECORE (*__morecore)
|
#define MORECORE (*__morecore)
|
||||||
#define MORECORE_FAILURE 0
|
#define MORECORE_FAILURE 0
|
||||||
|
|
||||||
|
#ifndef MORECORE_CLEARS
|
||||||
#define MORECORE_CLEARS 1
|
#define MORECORE_CLEARS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static size_t __libc_pagesize;
|
||||||
|
|
||||||
#define mmap __mmap
|
#define mmap __mmap
|
||||||
#define munmap __munmap
|
#define munmap __munmap
|
||||||
#define mremap __mremap
|
#define mremap __mremap
|
||||||
@ -3596,10 +3604,16 @@ Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size;
|
|||||||
if(!ar_ptr)
|
if(!ar_ptr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* check if expand_top called, in which case don't need to clear */
|
/* Check if expand_top called, in which case there may be
|
||||||
|
no need to clear. */
|
||||||
#if MORECORE_CLEARS
|
#if MORECORE_CLEARS
|
||||||
oldtop = top(ar_ptr);
|
oldtop = top(ar_ptr);
|
||||||
oldtopsize = chunksize(top(ar_ptr));
|
oldtopsize = chunksize(top(ar_ptr));
|
||||||
|
#if MORECORE_CLEARS < 2
|
||||||
|
/* Only newly allocated memory is guaranteed to be cleared. */
|
||||||
|
if (oldtopsize < sbrk_base + max_sbrked_mem - (char *)oldtop)
|
||||||
|
oldtopsize = (sbrk_base + max_sbrked_mem - (char *)oldtop);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
p = chunk_alloc (ar_ptr, sz);
|
p = chunk_alloc (ar_ptr, sz);
|
||||||
|
|
||||||
|
@ -175,13 +175,16 @@ __MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y));
|
|||||||
is +Infinity, -1 if it is -Infinity. */
|
is +Infinity, -1 if it is -Infinity. */
|
||||||
__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
|
__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
|
||||||
|
|
||||||
|
/* Return nonzero if VALUE is finite and not NaN. */
|
||||||
|
__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
|
||||||
|
|
||||||
#ifdef __USE_MISC
|
#ifdef __USE_MISC
|
||||||
/* Return 0 if VALUE is finite or NaN, +1 if it
|
/* Return 0 if VALUE is finite or NaN, +1 if it
|
||||||
is +Infinity, -1 if it is -Infinity. */
|
is +Infinity, -1 if it is -Infinity. */
|
||||||
__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
|
__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
|
||||||
|
|
||||||
/* Return nonzero if VALUE is finite and not NaN. */
|
/* Return nonzero if VALUE is finite and not NaN. */
|
||||||
__MATHDECLX (int,finite,, (_Mdouble_ __value), (__const__));
|
__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
|
||||||
|
|
||||||
/* Deal with an infinite or NaN result.
|
/* Deal with an infinite or NaN result.
|
||||||
If ERROR is ERANGE, result is +Inf;
|
If ERROR is ERANGE, result is +Inf;
|
||||||
@ -211,11 +214,11 @@ __MATHCALLX (nan,, (__const char *__tagb), (__const__));
|
|||||||
|
|
||||||
|
|
||||||
/* Return nonzero if VALUE is not a number. */
|
/* Return nonzero if VALUE is not a number. */
|
||||||
__MATHDECLX (int,__isnan,, (_Mdouble_ __value), (__const__));
|
__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
|
||||||
|
|
||||||
#if defined __USE_MISC || defined __USE_XOPEN
|
#if defined __USE_MISC || defined __USE_XOPEN
|
||||||
/* Return nonzero if VALUE is not a number. */
|
/* Return nonzero if VALUE is not a number. */
|
||||||
__MATHDECLX (int,isnan,, (_Mdouble_ __value), (__const__));
|
__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
|
||||||
|
|
||||||
/* Bessel functions. */
|
/* Bessel functions. */
|
||||||
__MATHCALL (j0,, (_Mdouble_));
|
__MATHCALL (j0,, (_Mdouble_));
|
||||||
|
@ -213,8 +213,11 @@ I am ready for my first lesson today.";
|
|||||||
|
|
||||||
{
|
{
|
||||||
char buf[20];
|
char buf[20];
|
||||||
|
char buf2[512];
|
||||||
printf ("snprintf (\"%%30s\", \"foo\") == %d, \"%.*s\"\n",
|
printf ("snprintf (\"%%30s\", \"foo\") == %d, \"%.*s\"\n",
|
||||||
snprintf (buf, sizeof (buf), "%30s", "foo"), sizeof (buf), buf);
|
snprintf (buf, sizeof (buf), "%30s", "foo"), sizeof (buf), buf);
|
||||||
|
printf ("snprintf (\"%%.999999u\", 10)\n",
|
||||||
|
snprintf(buf2, sizeof(buf2), "%.999999u", 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
fp_test ();
|
fp_test ();
|
||||||
|
@ -8,6 +8,10 @@ ifeq ($(subdir),db2)
|
|||||||
CPPFLAGS += -DHAVE_LLSEEK=1
|
CPPFLAGS += -DHAVE_LLSEEK=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(subdir),malloc)
|
||||||
|
CFLAGS-malloc.c = -DMORECORE_CLEARS=2
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(subdir),misc)
|
ifeq ($(subdir),misc)
|
||||||
sysdep_routines += sysctl clone llseek getresuid getresgid umount umount2
|
sysdep_routines += sysctl clone llseek getresuid getresgid umount umount2
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user