diff options
| author | Ulrich Drepper <drepper@redhat.com> | 1997-06-14 23:17:05 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 1997-06-14 23:17:05 +0000 |
| commit | 900bec852d0bd53eb27b8b2193899f5cf470b38f (patch) | |
| tree | cb4504e7abecc289fcdd2fb43efad14ec6302d8e | |
| parent | ce37fa887b0ea89614d9538e90ade7356b80f48c (diff) | |
| download | glibc-900bec852d0bd53eb27b8b2193899f5cf470b38f.tar.xz glibc-900bec852d0bd53eb27b8b2193899f5cf470b38f.zip | |
Update.cvs/libc-ud-970614
1997-06-15 00:43 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig: Define libc-map here.
* Makefile: And remove definition here.
* Makerules (load-map-file): Handle case where map file is in
other directory.
(build-shlib): Likewise.
* libc.map: Add more symbols.
* resolv/libresolv.map: Likewise.
* db/libdb.map: Add __dbopen. Patch by HJ Lu.
* libio/stdio.h: Remove "optmizations" for vfscanf and vsscanf.
* locale/programs/localedef.c: Add normalize_codeset function. We
don't want to use the _nl_normalize_codeset functions from libc.
* sysdeps/libm-i387/s_asinh.S: Handle +-Inf and NaN correctly.
* sysdeps/libm-i387/s_asinhf.S: Likewise.
* sysdeps/libm-i387/s_asinhl.S: Likewise.
* sysdeps/libm-i387/s_nearbyint.S: Correctly leave function.
* sysdeps/libm-i387/s_nearbyintf.S: Likewise.
* sysdeps/libm-i387/s_nearbyintl.S: Likewise.
1997-06-14 12:45 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nss_nis/nis-ethers.c: Add static to internal_nis_setetherent.
* nis/nss_nis/nis-proto.c: Add static to internal_nis_setprotoent.
* nis/nss_nisplus/nisplus-hosts.c: Rewrite parser and fix
_nss_nisplus_gethostbyaddr_r interface.
* nis/libnsl.map: Add all GLOBAL functions.
1997-06-13 18:32 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* libm-test.c (main): Call new tests, reorder tests.
(fmod_test): Test function fmod.
(nearbyint_test): Test function nearbyint.
(acos_test): Add more test cases.
(signbit_test): Test macro signbit.
(output_result_bool): Output result if test fails.
(asin_test): Add another test case.
(atan2_test): Add more tests.
(asinh_test): Add more tests.
(atanh_test): Add more tests.
(hypot_test): Add more tests.
(isfinite_test): Test macro isfinite.
(isnormal_test): Test macro isnormal.
(sincos_test): Tests for sincos.
(main): Enable remquo_test since the tests are
correct (according to ANSI/IEEE 754-1985).
(remquo_test): Corrected tests cases and added more tests.
(remainder_test): Tests for remainder.
(check_int): New Function to compare int values.
(check_isnan_exc_ext): New function.
(sqrt_test): Add some extra tests for sqrt.
(erf_test): Tests for erf.
(erfc_test): Tests for erfc.
(gamma_test): Tests for gamma.
(lgamma_test): Tests for lgamma.
1997-06-08 10:54 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/configure.in: Try to generate
stdio_lim.h using the target C preprocessor and mk-stdiolim.c.
* sysdeps/unix/sysv/linux/stdio_lim.h.in: New, template for
stdio_lim.h.
* sysdeps/unix/sysv/linux/mk-stdiolim.c: New, used by the
target C preprocessor to extract OPEN_MAX and PATH_MAX.
1997-06-14 17:32 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* math/libm.map: Add inline functions, global variables.
| -rw-r--r-- | ChangeLog | 77 | ||||
| -rw-r--r-- | Makeconfig | 8 | ||||
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | Makerules | 12 | ||||
| -rw-r--r-- | db/libdb.map | 2 | ||||
| -rw-r--r-- | libc.map | 14 | ||||
| -rw-r--r-- | libio/stdio.h | 19 | ||||
| -rw-r--r-- | locale/programs/localedef.c | 48 | ||||
| -rw-r--r-- | math/libm-test.c | 542 | ||||
| -rw-r--r-- | math/libm.map | 10 | ||||
| -rw-r--r-- | nis/libnsl.map | 64 | ||||
| -rw-r--r-- | nis/nss_nis/nis-ethers.c | 2 | ||||
| -rw-r--r-- | nis/nss_nis/nis-proto.c | 2 | ||||
| -rw-r--r-- | nis/nss_nisplus/nisplus-hosts.c | 197 | ||||
| -rw-r--r-- | resolv/libresolv.map | 2 | ||||
| -rw-r--r-- | sysdeps/libm-i387/s_asinh.S | 6 | ||||
| -rw-r--r-- | sysdeps/libm-i387/s_asinhf.S | 6 | ||||
| -rw-r--r-- | sysdeps/libm-i387/s_asinhl.S | 6 | ||||
| -rw-r--r-- | sysdeps/libm-i387/s_nearbyint.S | 2 | ||||
| -rw-r--r-- | sysdeps/libm-i387/s_nearbyintf.S | 2 | ||||
| -rw-r--r-- | sysdeps/libm-i387/s_nearbyintl.S | 2 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/configure.in | 24 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/mk-stdiolim.c | 4 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/stdio_lim.h.in | 8 |
24 files changed, 885 insertions, 177 deletions
@@ -1,3 +1,80 @@ +1997-06-15 00:43 Ulrich Drepper <drepper@cygnus.com> + + * Makeconfig: Define libc-map here. + * Makefile: And remove definition here. + * Makerules (load-map-file): Handle case where map file is in + other directory. + (build-shlib): Likewise. + + * libc.map: Add more symbols. + * resolv/libresolv.map: Likewise. + + * db/libdb.map: Add __dbopen. Patch by HJ Lu. + + * libio/stdio.h: Remove "optmizations" for vfscanf and vsscanf. + + * locale/programs/localedef.c: Add normalize_codeset function. We + don't want to use the _nl_normalize_codeset functions from libc. + + * sysdeps/libm-i387/s_asinh.S: Handle +-Inf and NaN correctly. + * sysdeps/libm-i387/s_asinhf.S: Likewise. + * sysdeps/libm-i387/s_asinhl.S: Likewise. + * sysdeps/libm-i387/s_nearbyint.S: Correctly leave function. + * sysdeps/libm-i387/s_nearbyintf.S: Likewise. + * sysdeps/libm-i387/s_nearbyintl.S: Likewise. + +1997-06-14 12:45 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> + + * nis/nss_nis/nis-ethers.c: Add static to internal_nis_setetherent. + + * nis/nss_nis/nis-proto.c: Add static to internal_nis_setprotoent. + + * nis/nss_nisplus/nisplus-hosts.c: Rewrite parser and fix + _nss_nisplus_gethostbyaddr_r interface. + + * nis/libnsl.map: Add all GLOBAL functions. + +1997-06-13 18:32 Andreas Jaeger <aj@arthur.rhein-neckar.de> + + * libm-test.c (main): Call new tests, reorder tests. + (fmod_test): Test function fmod. + (nearbyint_test): Test function nearbyint. + (acos_test): Add more test cases. + (signbit_test): Test macro signbit. + (output_result_bool): Output result if test fails. + (asin_test): Add another test case. + (atan2_test): Add more tests. + (asinh_test): Add more tests. + (atanh_test): Add more tests. + (hypot_test): Add more tests. + (isfinite_test): Test macro isfinite. + (isnormal_test): Test macro isnormal. + (sincos_test): Tests for sincos. + (main): Enable remquo_test since the tests are + correct (according to ANSI/IEEE 754-1985). + (remquo_test): Corrected tests cases and added more tests. + (remainder_test): Tests for remainder. + (check_int): New Function to compare int values. + (check_isnan_exc_ext): New function. + (sqrt_test): Add some extra tests for sqrt. + (erf_test): Tests for erf. + (erfc_test): Tests for erfc. + (gamma_test): Tests for gamma. + (lgamma_test): Tests for lgamma. + +1997-06-08 10:54 H.J. Lu <hjl@gnu.ai.mit.edu> + + * sysdeps/unix/sysv/linux/configure.in: Try to generate + stdio_lim.h using the target C preprocessor and mk-stdiolim.c. + * sysdeps/unix/sysv/linux/stdio_lim.h.in: New, template for + stdio_lim.h. + * sysdeps/unix/sysv/linux/mk-stdiolim.c: New, used by the + target C preprocessor to extract OPEN_MAX and PATH_MAX. + +1997-06-14 17:32 Andreas Jaeger <aj@arthur.rhein-neckar.de> + + * math/libm.map: Add inline functions, global variables. + 1997-06-14 00:39 Ulrich Drepper <drepper@cygnus.com> * libc.map: Add more libio functions which are used in libio.h. diff --git a/Makeconfig b/Makeconfig index 9c7df17ffd..73cae78aed 100644 --- a/Makeconfig +++ b/Makeconfig @@ -380,6 +380,14 @@ else link-libc = $(common-objpfx)libc.a $(gnulib) $(common-objpfx)libc.a endif endif + +# We have a versioning file for libc.so. We must define this here since +# otherwise in the subdirs this definition is not available and a rebuild +# of libc.so happens without versioning. +ifndef libc-map +libc-map = libc.map +endif + ifndef link-extra-libs ifeq (yes,$(build-shared)) ifneq ($(common-objpfx),$(objpfx)) @@ -107,9 +107,6 @@ $(objpfx)munch-init.c: munch.awk munch-tmpl.c $(+subdir_inits) generated := $(generated) munch-init.c endif -# We have a versioning file for libc.so. -libc-map = libc.map - include Makerules @@ -345,7 +345,11 @@ no-whole-archive = endif ifeq ($(versioning),yes) -load-map-file = $($(@F:%.so=%)-map:%=-Wl,--version-script=%) +ifneq ($(..),) +load-map-file = $(wildcard $($(@F:%.so=%)-map) $(..)$($(@F:%.so=%)-map)) +else +load-map-file = $($(@F:%.so=%)-map) +endif else load-map-file = endif @@ -361,11 +365,11 @@ $(patsubst %,$(objpfx)%.so,$(extra-libs)): $(interp-obj) define build-shlib $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \ - -B$(csu-objpfx) $(load-map-file) \ + -B$(csu-objpfx) $(load-map-file:%=-Wl,--version-script=%) \ -Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \ $(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \ -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \ - -Wl,--whole-archive $(filter-out $($(@F:%.so=%-map)),$^) \ + -Wl,--whole-archive $(filter-out $(load-map-file),$^) \ $(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so) test -z "$($(@F)-version)" || \ (rm -f $@$($(@F)-version); $(LN_S) $(@F) $@$($(@F)-version)) @@ -383,7 +387,7 @@ LDFLAGS-c.so += -e __libc_main $(common-objpfx)libc.so: $(elfobjdir)/soinit.so \ $(common-objpfx)libc_pic.a \ $(elfobjdir)/sofini.so $(elfobjdir)/ld.so \ - $(libc-map) + $(libc-map:%=$(..)%) $(build-shlib) endif diff --git a/db/libdb.map b/db/libdb.map index 3ce01866f2..01414a1708 100644 --- a/db/libdb.map +++ b/db/libdb.map @@ -1,7 +1,7 @@ GLIBC_2.0 { global: # the real DB entry point. - dbopen; + dbopen; __dbopen; # The compatibility functions. dbm_clearerr; dbm_close; dbm_delete; dbm_dirfno; dbm_error; @@ -4,10 +4,11 @@ GLIBC_2.0 { _errno; _itoa_lower_digits; _itoa_upper_digits; __ctype_b; __ctype_tolower; __ctype_toupper; _IO_stderr_; _IO_stdin_; _IO_stdout_; - _nl_msg_cat_cntr; __environ; _environ; + _nl_msg_cat_cntr; __environ; _environ; _res; + ___brk_addr; __curbrk; _nl_current_LC_CTYPE; _libc_intl_domainname; # helper functions - __errno_location; __libc_init_first; + __errno_location; __libc_init_first; __h_errno_location; # functions with special/multiple interfaces __sigsetjmp; _setjmp; __sigaddset; __sigdelset; __sigismember; @@ -34,6 +35,7 @@ GLIBC_2.0 { # functions used in inline functions or macros __strto*_internal; __wcsto*_internal; __getdelim; __isnan; __isnanf; __isnanl; __finite; __finitef; __finitel; + __isinf; __isinff; __isinfl; __signbit; __signbitf; __signbitl; __cmsg_nxthdr; _obstack_allocated_p; _obstack_begin; _obstack_begin_1; _obstack_free; _obstack_memory_used; _obstack_newchunk; @@ -41,7 +43,13 @@ GLIBC_2.0 { _IO_getc; _IO_peekc_unlocked; _IO_putc; _IO_feof; _IO_ferror; # functions used in other libraries - __printf_fp; + __printf_fp; __stpncpy; _dcgettext; + _nss_files_parse_grent; _nss_files_parse_pwent; _nss_files_parse_spent; + __nss_database_lookup; __internal_endnetgrent; __internal_getnetgrent_r; + __internal_setnetgrent; __gmtime_r; __secure_getenv; + __select; __sched_get_priority_max; __sched_get_priority_min; + __sched_getparam; __sched_getscheduler; __sched_setscheduler; + __sched_yield; __on_exit; __gettimeofday; __fork; __clone; # all functions and variables in the normal name space a*; b*; c*; d*; e*; f*; g*; h*; i*; j*; k*; l*; m*; diff --git a/libio/stdio.h b/libio/stdio.h index 0ed711a8cb..8ab11e6a91 100644 --- a/libio/stdio.h +++ b/libio/stdio.h @@ -291,25 +291,6 @@ extern int __vsscanf __P ((__const char *__s, __const char *__format, _G_va_list __arg)); extern int vsscanf __P ((__const char *__s, __const char *__format, _G_va_list __arg)); - - -#ifdef __OPTIMIZE__ -extern __inline int -vfscanf (FILE *__s, const char *__fmt, _G_va_list __arg) -{ - return __vfscanf (__s, __fmt, __arg); -} -extern __inline int -vscanf (const char *__fmt, _G_va_list __arg) -{ - return __vfscanf (stdin, __fmt, __arg); -} -extern __inline int -vsscanf (const char *__s, const char *__fmt, _G_va_list __arg) -{ - return __vsscanf (__s, __fmt, __arg); -} -#endif /* Optimizing. */ #endif /* Use GNU. */ diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c index 1830be3da4..34c7394d3d 100644 --- a/locale/programs/localedef.c +++ b/locale/programs/localedef.c @@ -36,7 +36,6 @@ #include "error.h" #include "charset.h" #include "locfile.h" -#include "../intl/loadinfo.h" /* Undefine the following line in the production version. */ /* #define NDEBUG 1 */ @@ -138,6 +137,7 @@ void *xmalloc (size_t __n); /* Prototypes for local functions. */ static void error_print (void); static const char *construct_output_path (char *path); +static const char *normalize_codeset (const char *codeset, size_t name_len); int @@ -475,7 +475,7 @@ construct_output_path (char *path) ++endp; if (endp > startp) - normal = _nl_normalize_codeset (startp, endp - startp); + normal = normalize_codeset (startp, endp - startp); } else /* This is to keep gcc quiet. */ @@ -512,3 +512,47 @@ construct_output_path (char *path) return result; } + +/* Normalize codeset name. There is no standard for the codeset + names. Normalization allows the user to use any of the common + names. */ +static const char * +normalize_codeset (codeset, name_len) + const char *codeset; + size_t name_len; +{ + int len = 0; + int only_digit = 1; + char *retval; + char *wp; + size_t cnt; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalnum (codeset[cnt])) + { + ++len; + + if (isalpha (codeset[cnt])) + only_digit = 0; + } + + retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); + + if (retval != NULL) + { + if (only_digit) + wp = stpcpy (retval, "iso"); + else + wp = retval; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalpha (codeset[cnt])) + *wp++ = tolower (codeset[cnt]); + else if (isdigit (codeset[cnt])) + *wp++ = codeset[cnt]; + + *wp = '\0'; + } + + return (const char *) retval; +} diff --git a/math/libm-test.c b/math/libm-test.c index b66371c212..156c7ebf98 100644 --- a/math/libm-test.c +++ b/math/libm-test.c @@ -41,12 +41,15 @@ /* This program isn't finished yet. It has tests for: acos, acosh, asin, asinh, atan, atan2, atanh, - cbrt, ceil, copysign, cos, cosh, exp, exp2, expm1, - fabs, fdim, floor, fmin, fmax, fpclassify, - frexp, hypot, ilogb, ldexp, - log, log10, log1p, log2, logb, modf, nextafter, - pow, rint, rinttol, rinttoll, round, roundtol, roundtoll, - scalb, scalbn, sin, sinh, sqrt, tan, tanh, trunc + cbrt, ceil, copysign, cos, cosh, erf, erfc, exp, exp2, expm1, + fabs, fdim, floor, fmin, fmax, fmod, fpclassify, + frexp, gamma, hypot, + ilogb, isfinite, isinf, isnan, isnormal, + ldexp, lgamma, log, log10, log1p, log2, logb, + modf, nearbyint, nextafter, + pow, remainder, remquo, rint, rinttol, rinttoll, + round, roundtol, roundtoll, + scalb, scalbn, signbit, sin, sincos, sinh, sqrt, tan, tanh, trunc and for the following complex math functions: cacos, cacosh, casin, casinh, catan, catanh, @@ -54,9 +57,9 @@ At the moment the following functions aren't tested: cabs, carg, conj, cproj, cimag, creal, drem, - erf, erfc, gamma, lgamma, j0, j1, jn, y0, y1, yn, - nearbyint, remainder, remquo, signbit, significant, sincos. + significand, + nan, comparison macros (isless,isgreater,...). The routines using random variables are still under construction. I don't like it the way it's working now and will change it. @@ -81,6 +84,14 @@ checked against. These implemented tests should check all cases that are specified in ISO C 9X. + Exception testing: At the moment only divide-by-zero and invalid + exceptions are tested. Overflow/underflow and inexact exceptions + aren't checked at the moment. + + NaN values: There exist signalling and quiet NaNs. This implementation + only uses signalling NaN as parameter but does not differenciate + between the two kinds of NaNs as result. + Inline functions: Inlining functions should give an improvement in speed - but not in precission. The inlined functions return reasonable values for a reasonable range of input values. The @@ -98,6 +109,7 @@ - Compiler has errors With e.g. gcc 2.7.2.2 the test for cexp fails because of a compiler error. + */ #ifndef _GNU_SOURCE @@ -201,13 +213,11 @@ random_greater (MATHTYPE min_value) } /* Get a random value x with x < max_value. */ -#ifndef TEST_INLINE static MATHTYPE random_less (MATHTYPE max_value) { return random_value (-1e6, max_value); } -#endif static void @@ -359,6 +369,8 @@ output_result_bool (const char *test_name, int result) else { output_fail_value (test_name); + if (verbose > 1) + printf (" Value: %d\n", result); ++noErrors; } @@ -548,6 +560,40 @@ check_bool (const char *test_name, int computed) output_result_bool (test_name, computed); } + + +/* + check that computed and expected values are equal (int values) + */ +static void +check_int (const char *test_name, int computed, int expected) +{ + int diff = computed - expected; + int result = diff == 0; + + output_new_test (test_name); + test_exceptions (test_name, NO_EXCEPTION); + + if (result) + { + output_pass_value (); + } + else + { + output_fail_value (test_name); + if (verbose > 1) + { + printf ("Result:\n"); + printf (" is: %d\n", computed); + printf (" should be: %d\n", expected); + } + noErrors++; + } + + fpstack_test (test_name); +} + + /* check that computed and expected values are equal (long int values) */ @@ -648,7 +694,6 @@ check_isnan_maybe_exc (const char *test_name, MATHTYPE computed, output_isvalue (test_name, isnan (computed), computed); } - /* check that computed value is not-a-number and supply parameter */ @@ -663,6 +708,19 @@ check_isnan_ext (const char *test_name, MATHTYPE computed, } #endif +/* + check that computed value is not-a-number, test for exceptions + and supply parameter + */ +static void +check_isnan_exc_ext (const char *test_name, MATHTYPE computed, + short exception, MATHTYPE parameter) +{ + output_new_test (test_name); + test_exceptions (test_name,exception); + output_isvalue_ext (test_name, isnan (computed), computed, parameter); +} + /* Tests if computed is +Inf */ static void @@ -741,11 +799,18 @@ acos_test (void) check_isnan_exc ("acos (x) == NaN plus invalid exception for |x| > 1", FUNC(acos) (x), INVALID_EXCEPTION); + + x = random_less (1); + check_isnan_exc ("acos (x) == NaN plus invalid exception for |x| > 1", + FUNC(acos) (x), + INVALID_EXCEPTION); #endif check ("acos (1) == 0", FUNC(acos) (1), 0); + check ("acos (-1) == pi", FUNC(acos) (-1), M_PI); } + static void acosh_test (void) { @@ -773,6 +838,11 @@ asin_test (void) check_isnan_exc ("asin x == NaN plus invalid exception for |x| > 1", FUNC(asin) (x), INVALID_EXCEPTION); + + x = random_less (1); |
