summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-10-19 13:53:34 +0000
committerUlrich Drepper <drepper@redhat.com>1999-10-19 13:53:34 +0000
commitfe559c5e1ce629f94f1621c76f5cfd59d6028830 (patch)
tree8aff0f4deccf163242ad22f0dddcd2f2da238c26
parent8847214f239965f538e42a09d3d08ce8c700dea2 (diff)
Update.
1999-10-19 Andreas Jaeger <aj@suse.de> * include/bits/ipc.h: Remove K&R compatibility. * include/libintl.h: Likewise. * include/math.h: Likewise. * include/mntent.h: Likewise * include/netdb.h: Likewise. * include/pwd.h: Likewise. * include/sched.h: Likewise. * include/shadow.h: Likewise * include/stdlib.h: Likewise. * include/sys/file.h: Likewise. * include/sys/gmon.h: Likewise. * include/sys/ioctl.h: Likewise. * include/sys/mman.h: Likewise. * include/sys/resource.h: Likewise. * include/sys/socket.h: Likewise. * include/sys/stat.h: Likewise. * include/sys/sysinfo.h: Likewise. * include/sys/time.h: Likewise. * include/sys/times.h: Likewise. * include/sys/uio.h: Likewise. * include/sys/wait.h: Likewise. * include/termios.h: Likewise. * include/time.h: Likewise. * include/ulimit.h: Likewise. * include/utmp.h: Likewise. * include/wchar.h: Likewise. * include/wctype.h: Likewise. 1999-10-19 Andreas Jaeger <aj@suse.de> * math/libm-test.inc: Remove one K&R compatibility. (main): Enable nexttoward_test. * math/gen-libm-test.pl (output_ulps): Output name of Ulps file to libm-test-ulps.h; pretty print output a bit. 1999-10-19 Andreas Jaeger <aj@suse.de> * iconv/iconv_prog.c (main): Set exit value in case that reading from stdin failed [PR libc/1404].
-rw-r--r--ChangeLog43
-rw-r--r--iconv/iconv_prog.c5
-rw-r--r--include/bits/ipc.h4
-rw-r--r--include/libintl.h16
-rw-r--r--include/math.h2
-rw-r--r--include/mntent.h16
-rw-r--r--include/netdb.h124
-rw-r--r--include/pwd.h22
-rw-r--r--include/sched.h24
-rw-r--r--include/shadow.h26
-rw-r--r--include/stdlib.h70
-rw-r--r--include/sys/file.h2
-rw-r--r--include/sys/gmon.h4
-rw-r--r--include/sys/ioctl.h2
-rw-r--r--include/sys/mman.h16
-rw-r--r--include/sys/resource.h6
-rw-r--r--include/sys/socket.h2
-rw-r--r--include/sys/stat.h18
-rw-r--r--include/sys/sysinfo.h8
-rw-r--r--include/sys/time.h24
-rw-r--r--include/sys/times.h2
-rw-r--r--include/sys/uio.h8
-rw-r--r--include/sys/wait.h12
-rw-r--r--include/termios.h2
-rw-r--r--include/time.h52
-rw-r--r--include/ulimit.h2
-rw-r--r--include/utmp.h28
-rw-r--r--include/wchar.h78
-rw-r--r--include/wctype.h2
-rwxr-xr-xmath/gen-libm-test.pl28
-rw-r--r--math/libm-test.inc7
31 files changed, 351 insertions, 304 deletions
diff --git a/ChangeLog b/ChangeLog
index c5c1387bd2..688032e486 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+1999-10-19 Andreas Jaeger <aj@suse.de>
+
+ * include/bits/ipc.h: Remove K&R compatibility.
+ * include/libintl.h: Likewise.
+ * include/math.h: Likewise.
+ * include/mntent.h: Likewise
+ * include/netdb.h: Likewise.
+ * include/pwd.h: Likewise.
+ * include/sched.h: Likewise.
+ * include/shadow.h: Likewise
+ * include/stdlib.h: Likewise.
+ * include/sys/file.h: Likewise.
+ * include/sys/gmon.h: Likewise.
+ * include/sys/ioctl.h: Likewise.
+ * include/sys/mman.h: Likewise.
+ * include/sys/resource.h: Likewise.
+ * include/sys/socket.h: Likewise.
+ * include/sys/stat.h: Likewise.
+ * include/sys/sysinfo.h: Likewise.
+ * include/sys/time.h: Likewise.
+ * include/sys/times.h: Likewise.
+ * include/sys/uio.h: Likewise.
+ * include/sys/wait.h: Likewise.
+ * include/termios.h: Likewise.
+ * include/time.h: Likewise.
+ * include/ulimit.h: Likewise.
+ * include/utmp.h: Likewise.
+ * include/wchar.h: Likewise.
+ * include/wctype.h: Likewise.
+
+1999-10-19 Andreas Jaeger <aj@suse.de>
+
+ * math/libm-test.inc: Remove one K&R compatibility.
+ (main): Enable nexttoward_test.
+
+ * math/gen-libm-test.pl (output_ulps): Output name of Ulps file to
+ libm-test-ulps.h; pretty print output a bit.
+
+1999-10-19 Andreas Jaeger <aj@suse.de>
+
+ * iconv/iconv_prog.c (main): Set exit value in case that reading
+ from stdin failed [PR libc/1404].
+
1999-10-18 Andreas Jaeger <aj@suse.de>
Added improved math testsuite:
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index cd00bbfce7..3eda49a8db 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -162,7 +162,10 @@ main (int argc, char *argv[])
specified with the `-o' parameter. If we have no file given as
the parameter process all from stdin. */
if (remaining == argc)
- process_file (cd, stdin, output);
+ {
+ if (process_file (cd, stdin, output) != 0)
+ status = 1;
+ }
else
do
{
diff --git a/include/bits/ipc.h b/include/bits/ipc.h
index 5f699e8f49..92fb4505a5 100644
--- a/include/bits/ipc.h
+++ b/include/bits/ipc.h
@@ -3,8 +3,8 @@
__BEGIN_DECLS
/* The actual system call: all functions are multiplexed by this. */
-extern int __syscall_ipc __P ((int __call, int __first, int __second,
- int __third, void *__ptr));
+extern int __syscall_ipc (int __call, int __first, int __second,
+ int __third, void *__ptr) __THROW;
__END_DECLS
diff --git a/include/libintl.h b/include/libintl.h
index 5a51508950..d81d60438a 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -2,14 +2,14 @@
#include <intl/libintl.h>
/* Now define the internal interfaces. */
-extern char *__gettext __P ((__const char *__msgid));
-extern char *__dgettext __P ((__const char *__domainname,
- __const char *__msgid));
-extern char *__dcgettext __P ((__const char *__domainname,
- __const char *__msgid, int __category));
-extern char *__textdomain __P ((__const char *__domainname));
-extern char *__bindtextdomain __P ((__const char *__domainname,
- __const char *__dirname));
+extern char *__gettext (__const char *__msgid) __THROW;
+extern char *__dgettext (__const char *__domainname,
+ __const char *__msgid) __THROW;
+extern char *__dcgettext (__const char *__domainname,
+ __const char *__msgid, int __category) __THROW;
+extern char *__textdomain (__const char *__domainname) __THROW;
+extern char *__bindtextdomain (__const char *__domainname,
+ __const char *__dirname) __THROW;
extern const char _libc_intl_domainname[];
/* Define the macros `_' and `N_' for conveniently marking translatable
diff --git a/include/math.h b/include/math.h
index 98ee97deed..1cfd9b6cb5 100644
--- a/include/math.h
+++ b/include/math.h
@@ -3,6 +3,6 @@
#include <math/math.h>
/* Now define the internal interfaces. */
-extern int __matherr __P ((struct exception *__exc));
+extern int __matherr (struct exception *__exc) __THROW;
#endif
diff --git a/include/mntent.h b/include/mntent.h
index ca8dfc5069..5097e4a37a 100644
--- a/include/mntent.h
+++ b/include/mntent.h
@@ -2,12 +2,12 @@
#include <misc/mntent.h>
/* Now define the internal interfaces. */
-extern FILE *__setmntent __P ((__const char *__file, __const char *__mode));
-extern struct mntent *__getmntent_r __P ((FILE *__stream,
- struct mntent *__result,
- char *__buffer, int __bufsize));
-extern int __addmntent __P ((FILE *__stream, __const struct mntent *__mnt));
-extern int __endmntent __P ((FILE *__stream));
-extern char *__hasmntopt __P ((__const struct mntent *__mnt,
- __const char *__opt));
+extern FILE *__setmntent (__const char *__file, __const char *__mode) __THROW;
+extern struct mntent *__getmntent_r (FILE *__stream,
+ struct mntent *__result,
+ char *__buffer, int __bufsize) __THROW;
+extern int __addmntent (FILE *__stream, __const struct mntent *__mnt) __THROW;
+extern int __endmntent (FILE *__stream) __THROW;
+extern char *__hasmntopt (__const struct mntent *__mnt,
+ __const char *__opt) __THROW;
#endif
diff --git a/include/netdb.h b/include/netdb.h
index 8fffe3cc5d..cefd492a22 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -2,79 +2,79 @@
#include <resolv/netdb.h>
/* Document internal interfaces. */
-extern int __gethostent_r __P ((struct hostent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct hostent **__restrict __result,
- int *__restrict __h_errnop));
+extern int __gethostent_r (struct hostent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop) __THROW;
-extern int __gethostbyaddr_r __P ((__const char *__restrict __addr,
- size_t __len, int __type,
- struct hostent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct hostent **__restrict __result,
- int *__restrict __h_errnop));
+extern int __gethostbyaddr_r (__const char *__restrict __addr,
+ size_t __len, int __type,
+ struct hostent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop) __THROW;
-extern int __gethostbyname_r __P ((__const char *__restrict __name,
- struct hostent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct hostent **__restrict __result,
- int *__restrict __h_errnop));
+extern int __gethostbyname_r (__const char *__restrict __name,
+ struct hostent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop) __THROW;
-extern int __gethostbyname2_r __P ((__const char *__restrict __name, int __af,
- struct hostent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct hostent **__restrict __result,
- int *__restrict __h_errnop));
-
-extern int __getnetent_r __P ((struct netent *__restrict __result_buf,
+extern int __gethostbyname2_r (__const char *__restrict __name, int __af,
+ struct hostent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
- struct netent **__restrict __result,
- int *__restrict __h_errnop));
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop) __THROW;
-extern int __getnetbyaddr_r __P ((unsigned long int __net, int __type,
- struct netent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct netent **__restrict __result,
- int *__restrict __h_errnop));
+extern int __getnetent_r (struct netent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct netent **__restrict __result,
+ int *__restrict __h_errnop) __THROW;
-extern int __getnetbyname_r __P ((__const char *__restrict __name,
- struct netent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct netent **__restrict __result,
- int *__restrict __h_errnop));
+extern int __getnetbyaddr_r (unsigned long int __net, int __type,
+ struct netent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct netent **__restrict __result,
+ int *__restrict __h_errnop) __THROW;
-extern int __getservent_r __P ((struct servent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct servent **__restrict __result));
+extern int __getnetbyname_r (__const char *__restrict __name,
+ struct netent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct netent **__restrict __result,
+ int *__restrict __h_errnop) __THROW;
-extern int __getservbyname_r __P ((__const char *__restrict __name,
- __const char *__restrict __proto,
- struct servent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct servent **__restrict __result));
+extern int __getservent_r (struct servent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct servent **__restrict __result) __THROW;
-extern int __getservbyport_r __P ((int __port,
- __const char *__restrict __proto,
- struct servent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct servent **__restrict __result));
+extern int __getservbyname_r (__const char *__restrict __name,
+ __const char *__restrict __proto,
+ struct servent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct servent **__restrict __result) __THROW;
-extern int __getprotoent_r __P ((struct protoent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct protoent **__restrict __result));
+extern int __getservbyport_r (int __port,
+ __const char *__restrict __proto,
+ struct servent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct servent **__restrict __result) __THROW;
-extern int __getprotobyname_r __P ((__const char *__restrict __name,
- struct protoent *__restrict __result_buf,
- char *__restrict __buf, size_t __buflen,
- struct protoent **__restrict __result));
+extern int __getprotoent_r (struct protoent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct protoent **__restrict __result) __THROW;
-extern int __getprotobynumber_r __P ((int __proto,
- struct protoent *__restrict __res_buf,
- char *__restrict __buf, size_t __buflen,
- struct protoent **__restrict __result));
+extern int __getprotobyname_r (__const char *__restrict __name,
+ struct protoent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct protoent **__restrict __result) __THROW;
+
+extern int __getprotobynumber_r (int __proto,
+ struct protoent *__restrict __res_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct protoent **__restrict __result) __THROW;
-extern int __getnetgrent_r __P ((char **__restrict __hostp,
- char **__restrict __userp,
- char **__restrict __domainp,
- char *__restrict __buffer, size_t __buflen));
+extern int __getnetgrent_r (char **__restrict __hostp,
+ char **__restrict __userp,
+ char **__restrict __domainp,
+ char *__restrict __buffer, size_t __buflen) __THROW;
#endif /* !_NETDB_H */
diff --git a/include/pwd.h b/include/pwd.h
index 18e8ac7e94..6baec570fc 100644
--- a/include/pwd.h
+++ b/include/pwd.h
@@ -2,15 +2,15 @@
#include <pwd/pwd.h>
/* Now define the internal interfaces. */
-extern int __getpwent_r __P ((struct passwd *__resultbuf, char *__buffer,
- size_t __buflen, struct passwd **__result));
-extern int __getpwuid_r __P ((__uid_t __uid, struct passwd *__resultbuf,
- char *__buffer, size_t __buflen,
- struct passwd **__result));
-extern int __getpwnam_r __P ((__const char *__name, struct passwd *__resultbuf,
- char *__buffer, size_t __buflen,
- struct passwd **__result));
-extern int __fgetpwent_r __P ((FILE * __stream, struct passwd *__resultbuf,
- char *__buffer, size_t __buflen,
- struct passwd **__result));
+extern int __getpwent_r (struct passwd *__resultbuf, char *__buffer,
+ size_t __buflen, struct passwd **__result) __THROW;
+extern int __getpwuid_r (__uid_t __uid, struct passwd *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct passwd **__result) __THROW;
+extern int __getpwnam_r (__const char *__name, struct passwd *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct passwd **__result) __THROW;
+extern int __fgetpwent_r (FILE * __stream, struct passwd *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct passwd **__result) __THROW;
#endif
diff --git a/include/sched.h b/include/sched.h
index 853174deff..b159e7ac74 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -2,18 +2,18 @@
#include <posix/sched.h>
/* Now define the internal interfaces. */
-extern int __sched_setparam __P ((__pid_t __pid,
- __const struct sched_param *__param));
-extern int __sched_getparam __P ((__pid_t __pid, struct sched_param *__param));
-extern int __sched_setscheduler __P ((__pid_t __pid, int __policy,
- __const struct sched_param *__param));
-extern int __sched_getscheduler __P ((__pid_t __pid));
-extern int __sched_yield __P ((void));
-extern int __sched_get_priority_max __P ((int __algorithm));
-extern int __sched_get_priority_min __P ((int __algorithm));
-extern int __sched_rr_get_interval __P ((__pid_t __pid, struct timespec *__t));
+extern int __sched_setparam (__pid_t __pid,
+ __const struct sched_param *__param) __THROW;
+extern int __sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
+extern int __sched_setscheduler (__pid_t __pid, int __policy,
+ __const struct sched_param *__param) __THROW;
+extern int __sched_getscheduler (__pid_t __pid) __THROW;
+extern int __sched_yield (void) __THROW;
+extern int __sched_get_priority_max (int __algorithm) __THROW;
+extern int __sched_get_priority_min (int __algorithm) __THROW;
+extern int __sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
/* This is Linux specific. */
-extern int __clone __P ((int (*__fn) (void *__arg), void *__child_stack,
- int __flags, void *__arg));
+extern int __clone (int (*__fn) (void *__arg), void *__child_stack,
+ int __flags, void *__arg) __THROW;
#endif
diff --git a/include/shadow.h b/include/shadow.h
index be40eb42fa..18ed62c00a 100644
--- a/include/shadow.h
+++ b/include/shadow.h
@@ -2,17 +2,17 @@
#include <shadow/shadow.h>
/* Now define the internal interfaces. */
-extern int __getspent_r __P ((struct spwd *__result_buf, char *__buffer,
- size_t __buflen, struct spwd **__result));
-extern int __getspnam_r __P ((__const char *__name, struct spwd *__result_buf,
- char *__buffer, size_t __buflen,
- struct spwd **__result));
-extern int __sgetspent_r __P ((__const char *__string,
- struct spwd *__result_buf, char *__buffer,
- size_t __buflen, struct spwd **__result));
-extern int __fgetspent_r __P ((FILE *__stream, struct spwd *__result_buf,
- char *__buffer, size_t __buflen,
- struct spwd **__result));
-extern int __lckpwdf __P ((void));
-extern int __ulckpwdf __P ((void));
+extern int __getspent_r (struct spwd *__result_buf, char *__buffer,
+ size_t __buflen, struct spwd **__result) __THROW;
+extern int __getspnam_r (__const char *__name, struct spwd *__result_buf,
+ char *__buffer, size_t __buflen,
+ struct spwd **__result) __THROW;
+extern int __sgetspent_r (__const char *__string,
+ struct spwd *__result_buf, char *__buffer,
+ size_t __buflen, struct spwd **__result) __THROW;
+extern int __fgetspent_r (FILE *__stream, struct spwd *__result_buf,
+ char *__buffer, size_t __buflen,
+ struct spwd **__result) __THROW;
+extern int __lckpwdf (void) __THROW;
+extern int __ulckpwdf (void) __THROW;
#endif
diff --git a/include/stdlib.h b/include/stdlib.h
index 187c4585d8..65fd2cba1f 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -8,44 +8,44 @@
/* Now define the internal interfaces. */
#ifndef __Need_M_And_C
-extern int32_t __random __P ((void));
-extern void __srandom __P ((unsigned int __seed));
-extern __ptr_t __initstate __P ((unsigned int __seed, __ptr_t __statebuf,
- size_t __statelen));
-extern __ptr_t __setstate __P ((__ptr_t __statebuf));
-extern int __random_r __P ((struct random_data *__buf, int32_t *__result));
-extern int __srandom_r __P ((unsigned int __seed, struct random_data *__buf));
-extern int __initstate_r __P ((unsigned int __seed, __ptr_t __statebuf,
- size_t __statelen, struct random_data *__buf));
-extern int __setstate_r __P ((__ptr_t __statebuf, struct random_data *__buf));
-extern int __rand_r __P ((unsigned int *__seed));
-extern int __erand48_r __P ((unsigned short int __xsubi[3],
- struct drand48_data *__buffer, double *__result));
-extern int __nrand48_r __P ((unsigned short int __xsubi[3],
- struct drand48_data *__buffer,
- long int *__result));
-extern int __jrand48_r __P ((unsigned short int __xsubi[3],
- struct drand48_data *__buffer,
- long int *__result));
-extern int __srand48_r __P ((long int __seedval,
- struct drand48_data *__buffer));
-extern int __seed48_r __P ((unsigned short int __seed16v[3],
- struct drand48_data *__buffer));
-extern int __lcong48_r __P ((unsigned short int __param[7],
- struct drand48_data *__buffer));
+extern int32_t __random (void) __THROW;
+extern void __srandom (unsigned int __seed) __THROW;
+extern void *__initstate (unsigned int __seed, void *__statebuf,
+ size_t __statelen) __THROW;
+extern void *__setstate (void *__statebuf) __THROW;
+extern int __random_r (struct random_data *__buf, int32_t *__result) __THROW;
+extern int __srandom_r (unsigned int __seed, struct random_data *__buf) __THROW;
+extern int __initstate_r (unsigned int __seed, void *__statebuf,
+ size_t __statelen, struct random_data *__buf) __THROW;
+extern int __setstate_r (void *__statebuf, struct random_data *__buf) __THROW;
+extern int __rand_r (unsigned int *__seed) __THROW;
+extern int __erand48_r (unsigned short int __xsubi[3],
+ struct drand48_data *__buffer, double *__result) __THROW;
+extern int __nrand48_r (unsigned short int __xsubi[3],
+ struct drand48_data *__buffer,
+ long int *__result) __THROW;
+extern int __jrand48_r (unsigned short int __xsubi[3],
+ struct drand48_data *__buffer,
+ long int *__result) __THROW;
+extern int __srand48_r (long int __seedval,
+ struct drand48_data *__buffer) __THROW;
+extern int __seed48_r (unsigned short int __seed16v[3],
+ struct drand48_data *__buffer) __THROW;
+extern int __lcong48_r (unsigned short int __param[7],
+ struct drand48_data *__buffer) __THROW;
/* Internal function to compute next state of the generator. */
-extern int __drand48_iterate __P ((unsigned short int __xsubi[3],
- struct drand48_data *__buffer));
+extern int __drand48_iterate (unsigned short int __xsubi[3],
+ struct drand48_data *__buffer) __THROW;
-extern int __setenv __P ((__const char *__name, __const char *__value,
- int __replace));
-extern void __unsetenv __P ((__const char *__name));
-extern int __clearenv __P ((void));
-extern char *__canonicalize_file_name __P ((__const char *__name));
-extern char *__realpath __P ((__const char *__name, char *__resolved));
-extern int __ptsname_r __P ((int __fd, char *__buf, size_t __buflen));
-extern int __getpt __P ((void));
+extern int __setenv (__const char *__name, __const char *__value,
+ int __replace) __THROW;
+extern void __unsetenv (__const char *__name) __THROW;
+extern int __clearenv (void) __THROW;
+extern char *__canonicalize_file_name (__const char *__name) __THROW;
+extern char *__realpath (__const char *__name, char *__resolved) __THROW;
+extern int __ptsname_r (int __fd, char *__buf, size_t __buflen) __THROW;
+extern int __getpt (void) __THROW;
extern int __add_to_environ (const char *name, const char *value,
const char *combines, int replace);
diff --git a/include/sys/file.h b/include/sys/file.h
index c3f0af3710..3dac129f61 100644
--- a/include/sys/file.h
+++ b/include/sys/file.h
@@ -2,5 +2,5 @@
#include <misc/sys/file.h>
/* Now define the internal interfaces. */
-extern int __flock __P ((int __fd, int __operation));
+extern int __flock (int __fd, int __operation) __THROW;
#endif
diff --git a/include/sys/gmon.h b/include/sys/gmon.h
index 492d853f8e..5767759901 100644
--- a/include/sys/gmon.h
+++ b/include/sys/gmon.h
@@ -4,6 +4,6 @@
/* Now define the internal interfaces. */
/* Write current profiling data to file. */
-extern void __write_profiling __P ((void));
-extern void write_profiling __P ((void));
+extern void __write_profiling (void) __THROW;
+extern void write_profiling (void) __THROW;
#endif
diff --git a/include/sys/ioctl.h b/include/sys/ioctl.h
index 4d21030ed9..bc1e6d6b6f 100644
--- a/include/sys/ioctl.h
+++ b/include/sys/ioctl.h
@@ -2,5 +2,5 @@
#include <misc/sys/ioctl.h>
/* Now define the internal interfaces. */
-extern int __ioctl __P ((int __fd, unsigned long int __request, ...));
+extern int __ioctl (int __fd, unsigned long int __request, ...) __THROW;
#endif
diff --git a/include/sys/mman.h b/include/sys/mman.h
index 374de36211..a76c23688f 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -2,14 +2,14 @@
#include <misc/sys/mman.h>
/* Now define the internal interfaces. */
-extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
-extern __ptr_t __mmap64 __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off64_t __offset));
-extern int __munmap __P ((__ptr_t __addr, size_t __len));
-extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
+extern void *__mmap (void *__addr, size_t __len, int __prot,
+ int __flags, int __fd, __off_t __offset) __THROW;
+extern void *__mmap64 (void *__addr, size_t __len, int __prot,
+ int __flags, int __fd, __off64_t __offset) __THROW;
+extern int __munmap (void *__addr, size_t __len) __THROW;
+extern int __mprotect (void *__addr, size_t __len, int __prot) __THROW;
/* This one is Linux specific. */
-extern __ptr_t __mremap __P ((__ptr_t __addr, size_t __old_len,
- size_t __new_len, int __may_move));
+extern void *__mremap (void *__addr, size_t __old_len,
+ size_t __new_len, int __may_move) __THROW;
#endif
diff --git a/include/sys/resource.h b/include/sys/resource.h
index ec53c188f9..e234cc0426 100644
--- a/include/sys/resource.h
+++ b/include/sys/resource.h
@@ -2,7 +2,7 @@
#include <resource/sys/resource.h>
/* Now define the internal interfaces. */
-extern int __getrlimit __P ((enum __rlimit_resource __resource,
- struct rlimit *__rlimits));
-extern int __getrusage __P ((enum __rusage_who __who, struct rusage *__usage));
+extern int __getrlimit (enum __rlimit_resource __resource,
+ struct rlimit *__rlimits) __THROW;
+extern int __getrusage (enum __rusage_who __who, struct rusage *__usage) __THROW;
#endif
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 4766c206d8..d6737f5b34 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -2,5 +2,5 @@
#include <socket/sys/socket.h>
/* Now define the internal interfaces. */
-extern int __socket __P ((int __domain, int __type, int __protocol));
+extern int __socket (int __domain, int __type, int __protocol) __THROW;
#endif
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 768630fd34..09e3964e23 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -2,15 +2,15 @@
#include <io/sys/stat.h>
/* Now define the internal interfaces. */
-extern int __stat __P ((__const char *__file, struct stat *__buf));
-extern int __fstat __P ((int __fd, struct stat *__buf));
-extern int __lstat __P ((__const char *__file, struct stat *__buf));
-extern int __chmod __P ((__const char *__file, __mode_t __mode));
-extern int __fchmod __P ((int __fd, __mode_t __mode));
-extern __mode_t __umask __P ((__mode_t __mask));
-extern int __mkdir __P ((__const char *__path, __mode_t __mode));
-extern int __mknod __P ((__const char *__path,
- __mode_t __mode, __dev_t __dev));
+extern int __stat (__const char *__file, struct stat *__buf) __THROW;
+extern int __fstat (int __fd, struct stat *__buf) __THROW;
+extern int __lstat (__const char *__file, struct stat *__buf) __THROW;
+extern int __chmod (__const char *__file, __mode_t __mode) __THROW;
+extern int __fchmod (int __fd, __mode_t __mode) __THROW;
+extern __mode_t __umask (__mode_t __mask) __THROW;
+extern int __mkdir (__const char *__path, __mode_t __mode) __THROW;
+extern int __mknod (__const char *__path,
+ __mode_t __mode, __dev_t __dev) __THROW;
extern __inline__ int __stat (__const char *__path, struct stat *__statbuf)
{
return __xstat (_STAT_VER, __path, __statbuf);
diff --git a/include/sys/sysinfo.h b/include/sys/sysinfo.h
index 9d1549d225..c06c3ab0cb 100644
--- a/include/sys/sysinfo.h
+++ b/include/sys/sysinfo.h
@@ -4,15 +4,15 @@
/* Now we define the internal interface. */
/* Return number of configured processors. */
-extern int __get_nprocs_conf __P ((void));
+extern int __get_nprocs_conf (void) __THROW;
/* Return number of available processors. */
-extern int __get_nprocs __P ((void));
+extern int __get_nprocs (void) __THROW;
/* Return number of physical pages of memory in the system. */
-extern int __get_phys_pages __P ((void));
+extern int __get_phys_pages (void) __THROW;
/* Return number of available physical pages of memory in the system. */
-extern int __get_avphys_pages __P ((void));
+extern int __get_avphys_pages (void) __THROW;
#endif /* sys/sysinfo.h */
diff --git a/include/sys/time.h b/include/sys/time.h
index a6e5ac1a6d..a28142002b 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -2,16 +2,16 @@
#include <time/sys/time.h>
/* Now document the internal interfaces. */
-extern int __gettimeofday __P ((struct timeval *__tv,
- struct timezone *__tz));
-extern int __settimeofday __P ((__const struct timeval *__tv,
- __const struct timezone *__tz));
-extern int __adjtime __P ((__const struct timeval *__delta,
- struct timeval *__olddelta));
-extern int __getitimer __P ((enum __itimer_which __which,
- struct itimerval *__value));
-extern int __setitimer __P ((enum __itimer_which __which,
- __const struct itimerval *__new,
- struct itimerval *__old));
-extern int __utimes __P ((__const char *__file, struct timeval __tvp[2]));
+extern int __gettimeofday (struct timeval *__tv,
+ struct timezone *__tz) __THROW;
+extern int __settimeofday (__const struct timeval *__tv,
+ __const struct timezone *__tz) __THROW;
+extern int __adjtime (__const struct timeval *__delta,
+ struct timeval *__olddelta) __THROW;
+extern int __getitimer (enum __itimer_which __which,
+ struct itimerval *__value) __THROW;
+extern int __setitimer (enum __itimer_which __which,
+ __const struct itimerval *__new,
+ struct itimerval *__old) __THROW;
+extern int __utimes (__const char *__file, struct timeval __tvp[2]) __THROW;
#endif
diff --git a/include/sys/times.h b/include/sys/times.h
index 611bb2fdc9..24f9fdad9f 100644
--- a/include/sys/times.h
+++ b/include/sys/times.h
@@ -2,5 +2,5 @@
#include <posix/sys/times.h>
/* Now define the internal interfaces. */
-extern clock_t __times __P ((struct tms *__buffer));
+extern clock_t __times (struct tms *__buffer) __THROW;
#endif
diff --git a/include/sys/uio.h b/include/sys/uio.h
index a3f51e5f6c..94ed4af042 100644
--- a/include/sys/uio.h
+++ b/include/sys/uio.h
@@ -2,8 +2,8 @@
#include <misc/sys/uio.h>
/* Now define the internal interfaces. */
-extern ssize_t __readv __P ((int __fd, __const struct iovec *__vector,
- int __count));
-extern ssize_t __writev __P ((int __fd, __const struct iovec *__vector,
- int __count));
+extern ssize_t __readv (int __fd, __const struct iovec *__vector,
+ int __count) __THROW;
+extern ssize_t __writev (int __fd, __const struct iovec *__vector,
+ int __count) __THROW;
#endif
diff --git a/include/sys/wait.h b/include/sys/wait.h
index 5ecce413ef..4b41bc8ef0 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -2,10 +2,10 @@
#include <posix/sys/wait.h>
/* Now define the internal interfaces. */
-extern __pid_t __waitpid __P ((__pid_t __pid, int *__stat_loc,
- int __options));
-extern __pid_t __wait3 __P ((__WAIT_STATUS __stat_loc,
- int __options, struct rusage * __usage));
-extern __pid_t __wait4 __P ((__pid_t __pid, __WAIT_STATUS __stat_loc,
- int __options, struct rusage *__usage));
+extern __pid_t __waitpid (__pid_t __pid, int *__stat_loc,
+ int __options) __THROW;
+extern __pid_t __wait3 (__WAIT_STATUS __stat_loc,
+ int __options, struct rusage * __usage) __THROW;
+extern __pid_t __wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc,
+ int __options, struct rusage *__usage) __THROW;
#endif
diff --git a/include/termios.h b/include/termios.h
index ed3b36525f..d7aee0630f 100644
--- a/include/termios.h
+++ b/include/termios.h
@@ -2,5 +2,5 @@
#include <termios/termios.h>
/* Now define the internal interfaces. */
-extern int __tcgetattr __P ((int __fd, struct termios *__termios_p));
+extern int __tcgetattr (int __fd, struct termios *__termios_p) __THROW;
#endif
diff --git a/include/time.h b/include/time.h
index bba13e7aa0..d0d7ebb3e4 100644
--- a/include/time.h
+++ b/include/time.h
@@ -14,7 +14,7 @@ extern const unsigned short int __mon_yday[2][13];
extern struct tm _tmbuf;
/* Defined in tzset.c. */
-extern char *__tzstring __P ((const char *string));
+extern char *__tzstring (const char *string) __THROW;
/* Defined in tzset.c. */
extern size_t __tzname_cur_max;
@@ -22,47 +22,47 @@ extern size_t __tzname_cur_max;
extern int __use_tzfile;
-extern void __tzfile_read __P ((const char *file, size_t extra,
- char **extrap));
-extern int __tzfile_compute __P ((time_t timer, int use_localtime,
- long int *leap_correct, int *leap_hit,
- struct tm *tp));
-extern void __tzfile_default __P ((const char *std, const char *dst,
- long int stdoff, long int dstoff));
+extern void __tzfile_read (const char *file, size_t extra,
+ char **extrap) __THROW;
+extern int __tzfile_compute (time_t timer, int use_localtime,
+ long int *leap_correct, int *leap_hit,
+ struct tm *tp) __THROW;
+extern void __tzfile_default (const char *std, const char *dst,
+ long int stdoff, long int dstoff) __THROW;
/* Subroutine of `mktime'. Return the `time_t' representation of TP and
normalize TP, given that a `struct tm *' maps to a `time_t' as performed
by FUNC. Keep track of next guess for time_t offset in *OFFSET. */
-extern time_t __mktime_internal __P ((struct tm *__tp,
- struct tm *(*__func) (const time_t *,
- struct tm *),
- time_t *__offset));
-extern struct tm *__localtime_r __P ((__const time_t *__timer,
- struct tm *__tp));
+extern time_t __mktime_internal (struct tm *__tp,
+ struct tm *(*__func) (const time_t *,
+ struct tm *),
+ time_t *__offset) __THROW;
+extern struct tm *__localtime_r (__const time_t *__timer,
+ struct tm *__tp) __THROW;
-extern struct tm *__gmtime_r __P ((__const time_t *__restrict __timer,
- struct tm *__restrict __tp));
+extern struct tm *__gmtime_r (__const time_t *__restrict __timer,
+ struct tm *__restrict __tp) __THROW;
/* Compute the `struct tm' representation of *T,
offset OFFSET seconds east of UTC,
and store year, yday, mon, mday, wday, hour, min, sec into *TP.
Return nonzero if successful. */
-extern int __offtime __P ((__const time_t *__timer,
- long int __offset,
- struct tm *__tp));
+extern int __offtime (__const time_t *__timer,
+ long int __offset,
+ struct tm *__tp) __THROW;
-extern char *__asctime_r __P ((__const struct tm *__tp, char *__buf));
-extern void __tzset __P ((void));
+extern char *__asctime_r (__const struct tm *__tp, char *__buf) __THROW;
+extern void __tzset (void) __THROW;
/* Prototype for the internal function to get information based on TZ. */
-extern struct tm *__tz_convert __P ((const time_t *timer, int use_localtime, struct tm *tp));
+extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct tm *tp) __THROW;
/* Return the maximum length of a timezone name.
This is what `sysconf (_SC_TZNAME_MAX)' does. */
-extern long int __tzname_max __P ((void));
+extern long int __tzname_max (void) __THROW;
-extern int __nanosleep __P ((__const struct timespec *__requested_time,
- struct timespec *__remaining));
-extern int __getdate_r __P ((__const char *__string, struct tm *__resbufp));
+extern int __nanosleep (__const struct timespec *__requested_time,
+ struct timespec *__remaining) __THROW;
+extern int __getdate_r (__const char *__string, struct tm *__resbufp) __THROW;
#endif
#endif
diff --git a/include/ulimit.h b/include/ulimit.h
index 8dc51d5fb7..f7c4b3be33 100644
--- a/include/ulimit.h
+++ b/include/ulimit.h
@@ -2,5 +2,5 @@
#include <resource/ulimit.h>
/* Now define the internal interfaces. */
-extern long int __ulimit __P ((int __cmd, ...));
+extern long int __ulimit (int __cmd, ...) __THROW;
#endif
diff --git a/include/utmp.h b/include/utmp.h
index b7f7d5fe2c..4f2bc88467 100644
--- a/include/utmp.h
+++ b/include/utmp.h
@@ -2,18 +2,18 @@
#include <login/utmp.h>
/* Now define the internal interfaces. */
-extern void __updwtmp __P ((__const char *__wtmp_file,
- __const struct utmp *__utmp));
-extern int __utmpname __P ((__const char *__file));
-extern struct utmp *__getutent __P ((void));
-extern void __setutent __P ((void));
-extern void __endutent __P ((void));
-extern struct utmp *__getutid __P ((__const struct utmp *__id));
-extern struct utmp *__getutline __P ((__const struct utmp *__line));
-extern struct utmp *__pututline __P ((__const struct utmp *__utmp_ptr));
-extern int __getutent_r __P ((struct utmp *__buffer, struct utmp **__result));
-extern int __getutid_r __P ((__const struct utmp *__id, struct utmp *__buffer,
- struct utmp **__result));
-extern int __getutline_r __P ((__const struct utmp *__line,
- struct utmp *__buffer, struct utmp **__result));
+extern void __updwtmp (__const char *__wtmp_file,
+ __const struct utmp *__utmp) __THROW;
+extern int __utmpname (__const char *__file) __THROW;
+extern struct utmp *__getutent (void) __THROW;
+extern void __setutent (void) __THROW;
+extern void __endutent (void) __THROW;
+extern struct utmp *__getutid (__const struct utmp *__id) __THROW;
+extern struct utmp *__getutline (__const struct utmp *__line) __THROW;
+extern struct utmp *__pututline (__const struct utmp *__utmp_ptr) __THROW;
+extern int __getutent_r (struct utmp *__buffer, struct utmp **__result) __THROW;
+extern int __getutid_r (__const struct utmp *__id, struct utmp *__buffer,
+ struct utmp **__result) __THROW;
+extern int __getutline_r (__const struct utmp *__line,
+ struct utmp *__buffer, struct utmp **__result) __THROW;
#endif
diff --git a/include/wchar.h b/include/wchar.h
index f000331a6f..0f70ced8c4 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -3,45 +3,45 @@
# ifdef _WCHAR_H
/* Now define the internal interfaces. */
-extern int __wcscasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2));
-extern int __wcsncasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2,
- size_t __n));
-extern size_t __wcsnlen __P ((__const wchar_t *__s, size_t __maxlen));
-extern wint_t __btowc __P ((int __c));
-extern int __mbsinit __P ((__const __mbstate_t *__ps));
-extern size_t __mbrtowc __P ((wchar_t *__restrict __pwc,
- __const char *__restrict __s, size_t __n,
- __mbstate_t *__restrict __p));
-extern size_t __wcrtomb __P ((char *__restrict __s, wchar_t __wc,
- __mbstate_t *__restrict __ps));
-extern size_t __mbsrtowcs __P ((wchar_t *__restrict __dst,
- __const char **__restrict __src,
- size_t __len, __mbstate_t *__restrict __ps));
-extern size_t __wcsrtombs __P ((char *__restrict __dst,
- __const wchar_t **__restrict __src,
- size_t __len, __mbstate_t *__restrict __ps));
-extern size_t __mbsnrtowcs __P ((wchar_t *__restrict __dst,
- __const char **__restrict __src, size_t __nmc,
- size_t __len, __mbstate_t *__restrict __ps));
-extern size_t __wcsnrtombs __P ((char *__restrict __dst,
- __const wchar_t **__restrict __src,
- size_t __nwc, size_t __len,
- __mbstate_t *__restrict __ps));
-extern wchar_t *__wcpcpy __P ((wchar_t *__dest, __const wchar_t *__src));
-extern wchar_t *__wcpncpy __P ((wchar_t *__dest, __const wchar_t *__src,
- size_t __n));
-extern wchar_t *__wmemcpy __P ((wchar_t *__s1, __const wchar_t *s2,
- size_t __n));
-extern wchar_t *__wmempcpy __P ((wchar_t *__restrict __s1,
- __const wchar_t *__restrict __s2,
- size_t __n));
-extern wchar_t *__wmemmove __P ((wchar_t *__s1, __const wchar_t *__s2,
- size_t __n));
-extern wchar_t *__wcschrnul __P ((__const wchar_t *__s, wchar_t __wc));
+extern int __wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __THROW;
+extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
+ size_t __n) __THROW;
+extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen) __THROW;
+extern wint_t __btowc (int __c) __THROW;
+extern int __mbsinit (__const __mbstate_t *__ps) __THROW;
+extern size_t __mbrtowc (wchar_t *__restrict __pwc,
+ __const char *__restrict __s, size_t __n,
+ __mbstate_t *__restrict __p) __THROW;
+extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc,
+ __mbstate_t *__restrict __ps) __THROW;
+extern size_t __mbsrtowcs (wchar_t *__restrict __dst,
+ __const char **__restrict __src,
+ size_t __len, __mbstate_t *__restrict __ps) __THROW;
+extern size_t __wcsrtombs (char *__restrict __dst,
+ __const wchar_t **__restrict __src,
+ size_t __len, __mbstate_t *__restrict __ps) __THROW;
+extern size_t __mbsnrtowcs (wchar_t *__restrict __dst,
+ __const char **__restrict __src, size_t __nmc,
+ size_t __len, __mbstate_t *__restrict __ps) __THROW;
+extern size_t __wcsnrtombs (char *__restrict __dst,
+ __const wchar_t **__restrict __src,
+ size_t __nwc, size_t __len,
+ __mbstate_t *__restrict __ps) __THROW;
+extern wchar_t *__wcpcpy (wchar_t *__dest, __const wchar_t *__src) __THROW;
+extern wchar_t *__wcpncpy (wchar_t *__dest, __const wchar_t *__src,
+ size_t __n) __THROW;
+extern wchar_t *__wmemcpy (wchar_t *__s1, __const wchar_t *s2,
+ size_t __n) __THROW;
+extern wchar_t *__wmempcpy (wchar_t *__restrict __s1,
+ __const wchar_t *__restrict __s2,
+ size_t __n) __THROW;
+extern wchar_t *__wmemmove (wchar_t *__s1, __const wchar_t *__s2,
+ size_t __n) __THROW;
+extern wchar_t *__wcschrnul (__const wchar_t *__s, wchar_t __wc) __THROW;
-extern int __vfwscanf __P ((FILE *__restrict __s,
- __const wchar_t *__restrict __format,
- __gnuc_va_list __arg))
- /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
+extern int __vfwscanf (FILE *__restrict __s,
+ __const wchar_t *__restrict __format,
+ __gnuc_va_list __arg) __THROW
+ /* __attribute__ ((__format__ (__wscanf__, 2, 0) __THROW) */;
# endif
#endif
diff --git a/include/wctype.h b/include/wctype.h
index f93ec64abc..f1a00f881e 100644
--- a/include/wctype.h
+++ b/include/wctype.h
@@ -2,6 +2,6 @@
#include <wctype/wctype.h>
-extern int __iswspace __P ((wint_t __wc));
+extern int __iswspace (wint_t __wc);
#endif
diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl
index f7bd323252..275ba7beaa 100755
--- a/math/gen-libm-test.pl
+++ b/math/gen-libm-test.pl
@@ -33,7 +33,7 @@ use vars qw (%ulps %failures);
use vars qw (%beautify);
use vars qw ($output_dir $ulps_file);
-%beautify =
+%beautify =
( "minus_zero" => "-0",
"plus_zero" => "+0",
"minus_infty" => "-inf",
@@ -97,7 +97,7 @@ $count = 0;
&parse_ulps ($ulps_file);
&generate_testfile ($input, $output);
-&output_ulps ("${output_dir}libm-test-ulps.h");
+&output_ulps ("${output_dir}libm-test-ulps.h", $ulps_file);
&print_ulps_file ("${output_dir}NewUlps") if ($opt_n);
# Return a nicer representation
@@ -142,8 +142,8 @@ sub build_complex_beautify {
sub get_variable {
my ($number) = @_;
- return "x" if ($number == 1);
- return "y" if ($number == 2);
+ return "x" if ($number == 1);
+ return "y" if ($number == 2);
return "z" if ($number == 3);
# return x1,x2,...
$number =-3;
@@ -186,7 +186,7 @@ sub special_functions {
my (@args, $str, $test, $cline);
@args = split /,\s*/, $args;
-
+
unless ($args[0] =~ /sincos/) {
die ("Don't know how to handle $args[0] extra.");
}
@@ -202,7 +202,7 @@ sub special_functions {
$cline = " check_float (\"$test\", sin_res, $args[2]";
$cline .= &new_test ($test, $args[4]);
print $file $cline;
-
+
# handle cos
$test = $str . ' puts ' . &beautify ($args[3]) . ' in cos_res';
$cline = " check_float (\"$test\", cos_res, $args[3]";
@@ -261,7 +261,7 @@ sub parse_args {
$call .= ')';
$str = "$call == ";
- # Result
+ # Result
@descr = split //,$descr_res;
foreach (@descr) {
if ($_ =~ /f|i|l|L/) {
@@ -382,7 +382,7 @@ sub parse_args {
my ($str) = "$call sets x to $special[0]";
$post = " check_float (\"$str\", x, $special[0]";
$post .= &new_test ($str, undef);
- }
+ }
} elsif ($args[0] eq 'remquo') {
if (defined $special[0] && $special[0] ne "IGNORE") {
my ($str) = "$call sets x to $special[0]";
@@ -390,7 +390,7 @@ sub parse_args {
$post .= &new_test ($str, undef);
}
}
-
+
print $file $pre if (defined $pre);
print $file " $cline\n";
@@ -500,7 +500,7 @@ sub print_ulps {
# Clean up a floating point number
sub clean_up_number {
my ($number) = @_;
-
+
# Remove trailing zeros
$number =~ s/0+$//;
$number =~ s/\.$//;
@@ -586,21 +586,23 @@ sub output_test {
# Print include file
sub output_ulps {
- my ($file) = @_;
+ my ($file, $ulps_filename) = @_;
my ($i, $fct);
open ULP, ">$file" or die ("Can't open $file: $!");
- print ULP "/* This file is automatically generated.\n";
+ print ULP "/* This file is automatically generated\n";
+ print ULP " from $ulps_filename with gen-libm-test.pl.\n";
print ULP " Don't change it - change instead the master files. */\n\n";
+ print ULP "\n/* Maximal error of functions. */\n";
foreach $fct (@functions) {
output_test (\*ULP, $fct, $fct);
}
+ print ULP "\n/* Error of single function calls. */\n";
for ($i = 0; $i < $count; $i++) {
output_test (\*ULP, $tests[$i], $i);
}
close ULP;
}
-
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 74bdd0381e..02b2f985cb 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -2969,7 +2969,7 @@ nextafter_test (void)
END (nextafter);
}
-#if 0
+
static void
nexttoward_test (void)
{
@@ -2993,7 +2993,6 @@ nexttoward_test (void)
END (nexttoward);
}
-#endif
static void
@@ -3706,7 +3705,7 @@ static const struct argp_option options[] =
static const char doc[] = "Math test suite: " TEST_MSG ;
/* Prototype for option handler. */
-static error_t parse_opt __P ((int key, char *arg, struct argp_state *state));
+static error_t parse_opt (int key, char *arg, struct argp_state *state);
/* Data structure to communicate with argp functions. */
static struct argp argp =
@@ -3884,7 +3883,7 @@ main (int argc, char **argv)
/* Manipulation functions: */
copysign_test ();
nextafter_test ();
- // nexttoward_test ();
+ nexttoward_test ();
/* maximum, minimum and positive difference functions */
fdim_test ();