update from main archive 970101

Wed Jan  1 15:15:00 1997  Ulrich Drepper  <drepper@cygnus.com>

	* libio/Makefile (routines): Add fcloseall.
	* libio/fcloseall.c: New file.
	* libio/stdio.h [__USE_GNU]: Add prototype for fcloseall.
	* libio/iofclose.c: Don't close all streams when argument is NULL.

	* stdio/Makefile (routines): Add fcloseall.
	* stdio/fcloseall.c: New file.
	* stdio/stdio.h [__USE_GNU]: Add prototype for fcloseall.
	* stdio/fclose.c: Don't close all streams when argument is NULL.

	* manual/stdio.texi: Document fcloseall.

	* sysdeps/generic/abort.c: Call __fcloseall instead of fclose with
	NULL argument.

	* socket/sys/un.h (SUN_LEN): Add cast.

	* sunrpc/auth_unix.c (authunix_create): Change parameter types
	of uid, gid, and aup_gids to uid_t and gid_t respectively.
	(authunix_create_default): Likewise.
	(authunix_refresh): Correct cast for aup_gids assignment.
	* sunrpc/rpc/auth.h (authunix_create): Correct types in declaration.
	* sunrpc/rpc/auth_unix.h (struct authunix_parms): Correct field
	types to uid_t and gid_t respectively.
	(struct short_hand_verf): Likewise.
	Reported by Andreas Schwab.

	* sysdeps/ieee754/Makefile: New file.  Make sure ieee754.h gets
	installed.
	* sysdeps/ieee754/ieee754.h: Protect against multiple inclusion and
	use in C++ programs.

	* sysdeps/libm-i387/e_pow.S: New file.  Optimized ix87 assembler
	version of pow() function.
	* sysdeps/libm-i387/e_powf.S: New file.  Float version.
	* sysdeps/libm-i387/e_powl.S: New file.  Long double version.

	* sysdeps/libm-i387/s_expm1.S: New file.  Optimized ix87 assembler
	version of expm1() function.
	* sysdeps/libm-i387/s_expm1f.S: New file.  Float version.
	* sysdeps/libm-i387/s_expm1l.S: New file.  Long double version.

	* sysdeps/libm-i387/e_exp.S: Optimize handling of +-Inf.
	Better handling of computation stack from current NetBSD sources.
	* sysdeps/libm-i387/e_expf.S: Likewise.
	* sysdeps/libm-i387/e_expl.S: Likewise.

	* sysdeps/libm-i387/e_log.S: Use fstp instead of fincstp.
	* sysdeps/libm-i387/e_logf.S: Likewise.
	* sysdeps/libm-i387/e_logl.S: Likewise.
	* sysdeps/libm-i387/e_log10.S: Likewise.
	* sysdeps/libm-i387/e_log10f.S: Likewise.
	* sysdeps/libm-i387/e_log10l.S: Likewise.
	* sysdeps/libm-i387/s_asinh.S: Likewise.
	* sysdeps/libm-i387/s_asinhf.S: Likewise.
	* sysdeps/libm-i387/s_asinhl.S: Likewise.
	* sysdeps/libm-i387/s_significandl.S: Likewise.

	* sysdeps/libm-i387/s_ceil.S: Don't create stack frame.  Modify
	stack pointer directly.  Use 32 bit instead of 16 bit operations.
	* sysdeps/libm-i387/s_ceilf.S: Likewise.
	* sysdeps/libm-i387/s_ceill.S: Likewise.
	* sysdeps/libm-i387/s_floor.S: Likewise.
	* sysdeps/libm-i387/s_floorf.S: Likewise.
	* sysdeps/libm-i387/s_floorl.S: Likewise.

	* sysdeps/libm-ieee754/e_coshf.c (huge): Don't declare volatile.
	* sysdeps/libm-ieee754/e_expf.c: Likewise.
	* sysdeps/libm-ieee754/e_powf.c: Likewise.
	From current NetBSD sources.

	* sysdeps/libm-ieee754/e_hypot.c (__ieee754_hypot): Don't initialize
	`a' and `b' in definition.
	* sysdeps/libm-ieee754/e_hypotf.c: Likewise.

	* sysdeps/libm-ieee754/e_hypotl.c: New file.  Long double
	implementation.
	* sysdeps/libm-ieee754/e_sinhl.c: New file.  Long double
	implementation.
	* sysdeps/stub/e_hypotl.c: Removed.  We have a real version now.
	* sysdeps/stub/e_sinhl.c: Removed.

	* sysdeps/posix/sigpause.c (__sigpause): Use sigdelset instead of
	sigaddset.  Reported by Andreas Schwab.
	(__default_sigpause): New function.  Call __sigpause as BSD version.
	Make this the default function by providing alias sigpause.
	* sysdeps/stub/sigpause.c (__default_sigpause): New funciton.
	Simply fail.  Provide alias sigpause.

Wed Jan  1 12:34:54 1997  Ulrich Drepper  <drepper@cygnus.com>

	* po/es.po: Update for glibc-1.98.
	* po/fr.po: Likewise.
	* po/sv.po: New file.  Swedish translation.

Wed Jan  1 12:18:07 1997   MacGyver  <macgyver@tos.net>

	* values.h: Fix typos: use SHRT_MAX but SHORT_MAX and SHRT_MIN but
	SHORT_MIN.

Tue Dec 24 23:10:21 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* Makefile: Replace `stubs.h' by `gnu/stubs.h'.
	* features.h: Include <gnu/stubs.h> instead of <stubs.h>.

Tue Dec 24 22:16:55 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* Makefile (subdirs): Move `elf' last so that librtld.so isn't
	relinked in the `make others' pass if an add-on adds something to
	libc.

Mon Dec 23 21:23:16 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/abort-instr.h: New File.

Mon Dec 23 21:16:38 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/Makefile ($(subdir)=elf): Define CFLAGS-rtld.c
	to prevent warning.

Mon Dec 23 21:14:22 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* resolv/Makefile (subdirs-dirs): Define.

Mon Dec 23 20:56:49 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/gnu/utmpbits.h (struct utmp): Fix padding.

Mon Dec 30 11:05:11 1996  Ulrich Drepper  <drepper@cygnus.com>

	Update from ADO tzcode1996o.
	* time/difftime.c: De-ANSI-declfy.  Simplify computation of hibit
	according to ADO version.
	* time/zic.c: Correct typo is message.

	Update from ADO tzdata1996n.
	* time/asia: Updated.
	* time/australasia: Likewise.
	* time/europe: Likewise.
	* time/northamerica: Likewise.
	* time/southamerica: Likewise.
This commit is contained in:
Ulrich Drepper 1997-01-01 15:28:18 +00:00
parent ea971c878f
commit 6bc31da01b
68 changed files with 5225 additions and 939 deletions

144
ChangeLog
View file

@ -1,3 +1,147 @@
Wed Jan 1 15:15:00 1997 Ulrich Drepper <drepper@cygnus.com>
* libio/Makefile (routines): Add fcloseall.
* libio/fcloseall.c: New file.
* libio/stdio.h [__USE_GNU]: Add prototype for fcloseall.
* libio/iofclose.c: Don't close all streams when argument is NULL.
* stdio/Makefile (routines): Add fcloseall.
* stdio/fcloseall.c: New file.
* stdio/stdio.h [__USE_GNU]: Add prototype for fcloseall.
* stdio/fclose.c: Don't close all streams when argument is NULL.
* manual/stdio.texi: Document fcloseall.
* sysdeps/generic/abort.c: Call __fcloseall instead of fclose with
NULL argument.
* socket/sys/un.h (SUN_LEN): Add cast.
* sunrpc/auth_unix.c (authunix_create): Change parameter types
of uid, gid, and aup_gids to uid_t and gid_t respectively.
(authunix_create_default): Likewise.
(authunix_refresh): Correct cast for aup_gids assignment.
* sunrpc/rpc/auth.h (authunix_create): Correct types in declaration.
* sunrpc/rpc/auth_unix.h (struct authunix_parms): Correct field
types to uid_t and gid_t respectively.
(struct short_hand_verf): Likewise.
Reported by Andreas Schwab.
* sysdeps/ieee754/Makefile: New file. Make sure ieee754.h gets
installed.
* sysdeps/ieee754/ieee754.h: Protect against multiple inclusion and
use in C++ programs.
* sysdeps/libm-i387/e_pow.S: New file. Optimized ix87 assembler
version of pow() function.
* sysdeps/libm-i387/e_powf.S: New file. Float version.
* sysdeps/libm-i387/e_powl.S: New file. Long double version.
* sysdeps/libm-i387/s_expm1.S: New file. Optimized ix87 assembler
version of expm1() function.
* sysdeps/libm-i387/s_expm1f.S: New file. Float version.
* sysdeps/libm-i387/s_expm1l.S: New file. Long double version.
* sysdeps/libm-i387/e_exp.S: Optimize handling of +-Inf.
Better handling of computation stack from current NetBSD sources.
* sysdeps/libm-i387/e_expf.S: Likewise.
* sysdeps/libm-i387/e_expl.S: Likewise.
* sysdeps/libm-i387/e_log.S: Use fstp instead of fincstp.
* sysdeps/libm-i387/e_logf.S: Likewise.
* sysdeps/libm-i387/e_logl.S: Likewise.
* sysdeps/libm-i387/e_log10.S: Likewise.
* sysdeps/libm-i387/e_log10f.S: Likewise.
* sysdeps/libm-i387/e_log10l.S: Likewise.
* sysdeps/libm-i387/s_asinh.S: Likewise.
* sysdeps/libm-i387/s_asinhf.S: Likewise.
* sysdeps/libm-i387/s_asinhl.S: Likewise.
* sysdeps/libm-i387/s_significandl.S: Likewise.
* sysdeps/libm-i387/s_ceil.S: Don't create stack frame. Modify
stack pointer directly. Use 32 bit instead of 16 bit operations.
* sysdeps/libm-i387/s_ceilf.S: Likewise.
* sysdeps/libm-i387/s_ceill.S: Likewise.
* sysdeps/libm-i387/s_floor.S: Likewise.
* sysdeps/libm-i387/s_floorf.S: Likewise.
* sysdeps/libm-i387/s_floorl.S: Likewise.
* sysdeps/libm-ieee754/e_coshf.c (huge): Don't declare volatile.
* sysdeps/libm-ieee754/e_expf.c: Likewise.
* sysdeps/libm-ieee754/e_powf.c: Likewise.
From current NetBSD sources.
* sysdeps/libm-ieee754/e_hypot.c (__ieee754_hypot): Don't initialize
`a' and `b' in definition.
* sysdeps/libm-ieee754/e_hypotf.c: Likewise.
* sysdeps/libm-ieee754/e_hypotl.c: New file. Long double
implementation.
* sysdeps/libm-ieee754/e_sinhl.c: New file. Long double
implementation.
* sysdeps/stub/e_hypotl.c: Removed. We have a real version now.
* sysdeps/stub/e_sinhl.c: Removed.
* sysdeps/posix/sigpause.c (__sigpause): Use sigdelset instead of
sigaddset. Reported by Andreas Schwab.
(__default_sigpause): New function. Call __sigpause as BSD version.
Make this the default function by providing alias sigpause.
* sysdeps/stub/sigpause.c (__default_sigpause): New funciton.
Simply fail. Provide alias sigpause.
Wed Jan 1 12:34:54 1997 Ulrich Drepper <drepper@cygnus.com>
* po/es.po: Update for glibc-1.98.
* po/fr.po: Likewise.
* po/sv.po: New file. Swedish translation.
Wed Jan 1 12:18:07 1997 MacGyver <macgyver@tos.net>
* values.h: Fix typos: use SHRT_MAX but SHORT_MAX and SHRT_MIN but
SHORT_MIN.
Tue Dec 24 23:10:21 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile: Replace `stubs.h' by `gnu/stubs.h'.
* features.h: Include <gnu/stubs.h> instead of <stubs.h>.
Tue Dec 24 22:16:55 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (subdirs): Move `elf' last so that librtld.so isn't
relinked in the `make others' pass if an add-on adds something to
libc.
Mon Dec 23 21:23:16 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/abort-instr.h: New File.
Mon Dec 23 21:16:38 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/Makefile ($(subdir)=elf): Define CFLAGS-rtld.c
to prevent warning.
Mon Dec 23 21:14:22 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* resolv/Makefile (subdirs-dirs): Define.
Mon Dec 23 20:56:49 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/gnu/utmpbits.h (struct utmp): Fix padding.
Mon Dec 30 11:05:11 1996 Ulrich Drepper <drepper@cygnus.com>
Update from ADO tzcode1996o.
* time/difftime.c: De-ANSI-declfy. Simplify computation of hibit
according to ADO version.
* time/zic.c: Correct typo is message.
Update from ADO tzdata1996n.
* time/asia: Updated.
* time/australasia: Likewise.
* time/europe: Likewise.
* time/northamerica: Likewise.
* time/southamerica: Likewise.
Mon Dec 30 01:32:59 1996 Ulrich Drepper <drepper@cygnus.com>
* tme/localtime.c: Rewrite so that localtime_r does not call tzset,

View file

@ -54,8 +54,8 @@ endif
subdirs = csu assert ctype db locale intl catgets math setjmp signal stdlib \
stdio-common $(stdio) $(malloc) string wcsmbs time dirent grp pwd \
posix io termios resource misc login socket sysvipc gmon gnulib \
wctype manual shadow md5-crypt nss $(sysdep-subdirs) elf po \
$(add-ons)
wctype manual shadow md5-crypt nss $(sysdep-subdirs) po \
$(add-ons) elf
export subdirs := $(subdirs) # Benign, useless in GNU make before 3.63.
# The mach and hurd subdirectories have many generated header files which
@ -90,7 +90,7 @@ before-compile = $(objpfx)version-info.h
echo-headers: subdir_echo-headers
# What to install.
install-others = $(includedir)/stubs.h
install-others = $(includedir)/gnu/stubs.h
ifeq (yes,$(build-shared))
install-others += $(includedir)/gnu/lib-names.h
endif
@ -158,7 +158,7 @@ $(version.c-objects): $(objpfx)version-info.h
# Makerules creates a file `stub-$(subdir)' for each subdirectory, which
# contains `#define __stub_FUNCTION' for each function which is a stub.
# Here we paste all of these together into <stubs.h>.
# Here we paste all of these together into <gnu/stubs.h>.
subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)stub-$(dir))
@ -168,7 +168,7 @@ subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)stub-$(dir))
# iterates over all the subdirs; subdir_install in each subdir depends on
# the subdir's stubs file. Having more direct dependencies would result in
# extra iterations over the list for subdirs and many recursive makes.
$(includedir)/stubs.h: subdir_install
$(includedir)/gnu/stubs.h: subdir_install
@rm -f $(objpfx)stubs.h
(echo '/* This file is automatically generated.';\
echo ' It defines a symbol `__stub_FUNCTION'\'' for each function';\
@ -182,7 +182,7 @@ $(includedir)/stubs.h: subdir_install
ifeq (yes,$(build-shared))
# Like stubs.h the gnu/lib-names.h header is not used while building the
# Like gnu/stubs.h the gnu/lib-names.h header is not used while building the
# libc itself. So we generate it while installing.
$(includedir)/gnu/lib-names.h: $(common-objpfx)soversions.mk
@rm -f $(objpfx)lib-names.h

View file

@ -208,15 +208,15 @@
/* This is here only because every header file already includes this one. */
#ifndef _LIBC
/* Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
<stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
<gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
which will always return failure (and set errno to ENOSYS).
We avoid including <stubs.h> when compiling the C library itself to
We avoid including <gnu/stubs.h> when compiling the C library itself to
avoid a dependency loop. stubs.h depends on every object file. If
this #include were done for the library source code, then every object
file would depend on stubs.h. */
#include <stubs.h>
#include <gnu/stubs.h>
#endif
#endif /* features.h */

View file

@ -32,7 +32,7 @@ routines := \
\
clearerr feof ferror fgetc fileno fputc freopen fseek getc getchar \
memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \
vdprintf vscanf vsnprintf obprintf \
vdprintf vscanf vsnprintf obprintf fcloseall \
\
libc_fatal

37
libio/fcloseall.c Normal file
View file

@ -0,0 +1,37 @@
/*
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option)
any later version.
This 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this library; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does not cause
the resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
#ifdef __STDC__
#include <stdlib.h>
#endif
int
__fcloseall ()
{
/* Close all streams. */
_IO_cleanup ();
return 0;
}
weak_alias (__fcloseall, fcloseall)

View file

@ -33,29 +33,20 @@ _IO_fclose (fp)
{
int status;
if (fp == NULL)
{
/* Close all streams. */
_IO_cleanup ();
status = 0;
}
else
{
CHECK_FILE(fp, EOF);
CHECK_FILE(fp, EOF);
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
status = _IO_file_close_it (fp);
else
status = fp->_flags & _IO_ERR_SEEN ? -1 : 0;
_IO_FINISH (fp);
_IO_cleanup_region_end (1);
if (fp != _IO_stdin && fp != _IO_stdout && fp != _IO_stderr)
{
fp->_IO_file_flags = 0;
free(fp);
}
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
status = _IO_file_close_it (fp);
else
status = fp->_flags & _IO_ERR_SEEN ? -1 : 0;
_IO_FINISH (fp);
_IO_cleanup_region_end (1);
if (fp != _IO_stdin && fp != _IO_stdout && fp != _IO_stderr)
{
fp->_IO_file_flags = 0;
free(fp);
}
return status;

View file

@ -166,6 +166,9 @@ extern int __vsscanf __P ((__const char *, __const char *, _G_va_list));
#endif
#ifdef __USE_GNU
extern int __fcloseall __P ((void));
extern int fcloseall __P ((void));
struct obstack;
extern int obstack_vprintf __P ((struct obstack *__obstack,
__const char *__fmt, _G_va_list));

View file

@ -279,6 +279,27 @@ you are using NFS.
The function @code{fclose} is declared in @file{stdio.h}.
@end deftypefun
To close all streams currently available the GNU C Library provides
another function.
@comment stdio.h
@comment GNU
@deftypefun int fcloseall (void)
This function causes all open streams of the process to be closed and
the connection to corresponding files to be broken. All buffered data
is written and any buffered inputis discarded. The @code{fcloseall}
function returns a value of @code{0} if all the files were closed
successfully, and @code{EOF} if an error was detected.
This function should be used in only in special situation, e.g., when an
error occurred and the program must be aborted. Normally each single
stream should be closed separately so that problems with one stream can
be identifier. It is also problematic since the standard streams
(@pxref{Standard Streams}) will also be closed.
The function @code{fcloseall} is declared in @file{stdio.h}.
@end deftypefun
If the @code{main} function to your program returns, or if you call the
@code{exit} function (@pxref{Normal Termination}), all open streams are
automatically closed properly. If your program terminates in any other

1071
po/es.po

File diff suppressed because it is too large Load diff

538
po/fr.po

File diff suppressed because it is too large Load diff

2828
po/sv.po Normal file

File diff suppressed because it is too large Load diff

View file

@ -33,6 +33,7 @@ libresolv-routines := gethnamaddr res_comp res_debug \
res_data res_mkquery res_query res_send \
inet_net_ntop inet_net_pton inet_neta base64
subdirs-dirs = nss_dns
vpath %.c nss_dns
libnss_dns-routines := dns-host dns-network

View file

@ -37,7 +37,7 @@ struct sockaddr_un
/* Evaluate to actual length of the `sockaddr_un' structure. */
#define SUN_LEN(ptr) (((struct sockaddr_un *) 0)->sun_path \
#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
+ strlen ((ptr)->sun_path))
__END_DECLS

View file

@ -12,9 +12,9 @@
# 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.
# 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.
#
# Specific makefile for stdio.
@ -34,7 +34,7 @@ routines := \
fputc putc putchar \
fgets gets fputs puts \
getdelim \
fclose fflush \
fclose fcloseall fflush \
vdprintf vsnprintf vsprintf vasprintf vsscanf vscanf \
memstream obstream linewrap \
internals sysd-stdio pipestream stdio_init libc_fatal

View file

@ -26,21 +26,11 @@
/* Close a stream. */
int
fclose (stream)
register FILE *stream;
FILE *stream;
{
int status;
if (stream == NULL)
{
/* Close all streams. */
register FILE *f;
for (f = __stdio_head; f != NULL; f = f->__next)
if (__validfp(f))
(void) fclose(f);
return 0;
}
if (!__validfp(stream))
if (!__validfp (stream))
{
__set_errno (EINVAL);
return EOF;
@ -53,18 +43,18 @@ fclose (stream)
/* Free the buffer's storage. */
if (stream->__buffer != NULL && !stream->__userbuf)
free(stream->__buffer);
free (stream->__buffer);
/* Close the system file descriptor. */
if (stream->__io_funcs.__close != NULL)
status = (*stream->__io_funcs.__close)(stream->__cookie);
status = (*stream->__io_funcs.__close) (stream->__cookie);
else if (!stream->__seen && stream->__cookie != NULL)
status = __stdio_close(stream->__cookie);
status = __stdio_close (stream->__cookie);
else
status = 0;
/* Nuke the stream, making it available for re-use. */
__invalidate(stream);
__invalidate (stream);
return status < 0 ? EOF : 0;
}

37
stdio/fcloseall.c Normal file
View file

@ -0,0 +1,37 @@
/* Copyright (C) 1991, 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. */
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
/* Close a stream. */
int
__fcloseall ()
{
/* Close all streams. */
register FILE *f;
for (f = __stdio_head; f != NULL; f = f->__next)
if (__validfp(f))
(void) fclose(f);
return 0;
}
weak_alias (__fcloseall, fcloseall)

View file

@ -324,11 +324,17 @@ extern char *tempnam __P ((__const char *__dir, __const char *__pfx));
extern int __flshfp __P ((FILE *__stream, int __c));
/* Close STREAM, or all streams if STREAM is NULL. */
/* Close STREAM. */
extern int fclose __P ((FILE *__stream));
/* Flush STREAM, or all streams if STREAM is NULL. */
extern int fflush __P ((FILE *__stream));
#ifdef __USE_GNU
/* Close all streams. */
extern int __fcloseall __P ((void));
extern int fcloseall __P ((void));
#endif
/* Open a file and create a new stream for it. */
extern FILE *fopen __P ((__const char *__filename, __const char *__modes));

View file

@ -92,10 +92,10 @@ static bool_t marshal_new_auth();
AUTH *
authunix_create(machname, uid, gid, len, aup_gids)
char *machname;
int uid;
int gid;
uid_t uid;
gid_t gid;
register int len;
int *aup_gids;
gid_t *aup_gids;
{
struct authunix_parms aup;
char mymem[MAX_AUTH_BYTES];
@ -172,8 +172,8 @@ authunix_create_default()
{
register int len;
char machname[MAX_MACHINE_NAME + 1];
register int uid;
register int gid;
register uid_t uid;
register gid_t gid;
int max_nr_groups = sysconf (_SC_NGROUPS_MAX);
gid_t gids[max_nr_groups];
@ -260,7 +260,7 @@ authunix_refresh(auth)
/* first deserialize the creds back into a struct authunix_parms */
aup.aup_machname = NULL;
aup.aup_gids = (int *)NULL;
aup.aup_gids = (gid_t *)NULL;
xdrmem_create(&xdrs, au->au_origcred.oa_base,
au->au_origcred.oa_length, XDR_DECODE);
stat = xdr_authunix_parms(&xdrs, &aup);

View file

@ -155,8 +155,9 @@ extern struct opaque_auth _null_auth;
* int len;
* int *aup_gids;
*/
extern AUTH *authunix_create __P ((char *__machname, int __uid, int __gid,
int __len, int *__aup_gids));
extern AUTH *authunix_create __P ((char *__machname, __uid_t __uid,
__gid_t __gid, int __len,
__gid_t *__aup_gids));
extern AUTH *authunix_create_default __P ((void));
extern AUTH *authnone_create __P ((void));
extern AUTH *authdes_create();

View file

@ -58,14 +58,15 @@ __BEGIN_DECLS
/*
* Unix style credentials.
*/
struct authunix_parms {
u_long aup_time;
char *aup_machname;
int aup_uid;
int aup_gid;
u_int aup_len;
int *aup_gids;
};
struct authunix_parms
{
u_long aup_time;
char *aup_machname;
__uid_t aup_uid;
__gid_t aup_gid;
u_int aup_len;
__gid_t *aup_gids;
};
extern bool_t xdr_authunix_parms __P ((XDR *__xdrs,
struct authunix_parms *__p));
@ -75,9 +76,10 @@ extern bool_t xdr_authunix_parms __P ((XDR *__xdrs,
* then the body of the response verifier encapsulates the following structure;
* again it is serialized in the obvious fashion.
*/
struct short_hand_verf {
struct opaque_auth new_cred;
};
struct short_hand_verf
{
struct opaque_auth new_cred;
};
__END_DECLS

View file

@ -90,7 +90,7 @@ abort (void)
if (stage == 4)
{
++stage;
fclose (NULL);
__fcloseall ();
}
/* Try again. */

View file

@ -96,7 +96,7 @@ struct utmp
long ut_session; /* Session ID, used for windowing. */
struct timeval ut_tv; /* Time entry was made. */
int32_t ut_addr_v6[4]; /* Internet address of remote host. */
char pad[18]; /* Reserved for future use. */
char pad[20]; /* Reserved for future use. */
};
/* Backwards compatibility hacks. */

3
sysdeps/ieee754/Makefile Normal file
View file

@ -0,0 +1,3 @@
ifeq ($(subdir),math)
sysdep_headers += ieee754.h
endif

View file

@ -16,8 +16,15 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef _IEEE754_H
#define _IEEE754_H 1
#include <features.h>
#include <endian.h>
__BEGIN_DECLS
union ieee754_float
{
float f;
@ -153,3 +160,7 @@ union ieee854_long_double
};
#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
__END_DECLS
#endif /* ieee754.h */

View file

@ -5,7 +5,7 @@
#include <machine/asm.h>
RCSID("$NetBSD: e_exp.S,v 1.4 1995/05/08 23:47:04 jtc Exp $")
RCSID("$NetBSD: e_exp.S,v 1.7 1996/07/03 17:31:28 jtc Exp $")
/* e^x = 2^(x * log2(e)) */
ENTRY(__ieee754_exp)
@ -16,16 +16,16 @@ ENTRY(__ieee754_exp)
-- drepper@cygnus.com. */
fxam /* Is NaN or +-Inf? */
fstsw %ax
sahf
jnc .LnoInfNaN /* No, jump. */
jp .LisInf /* Is +-Inf, jump. */
.LnoInfNaN:
movb $0x45, %dh
andb %ah, %dh
cmpb $0x05, %dh
je 1f /* Is +-Inf, jump. */
fldl2e
fmulp /* x * log2(e) */
fstl %st(1)
frndint /* int(x * log2(e)) */
fstl %st(2)
fsubrp /* fract(x * log2(e)) */
fsub %st,%st(1) /* fract(x * log2(e)) */
fxch
f2xm1 /* 2^(fract(x * log2(e))) - 1 */
fld1
faddp /* 2^(fract(x * log2(e))) */
@ -33,9 +33,8 @@ ENTRY(__ieee754_exp)
fstp %st(1)
ret
.LisInf:
andb $2, %ah /* Test sign. */
jz .LpInf /* If positive, jump. */
1: testl $0x200, %eax /* Test sign. */
jz 2f /* If positive, jump. */
fldz /* Set result to 0. */
.LpInf: ret
2: ret
END (__ieee754_exp)

View file

@ -17,16 +17,16 @@ ENTRY(__ieee754_expf)
-- drepper@cygnus.com. */
fxam /* Is NaN or +-Inf? */
fstsw %ax
sahf
jnc .LnoInfNaN /* No, jump. */
jp .LisInf /* Is +-Inf, jump. */
.LnoInfNaN:
movb $0x45, %dh
andb %ah, %dh
cmpb $0x05, %dh
je 1f /* Is +-Inf, jump. */
fldl2e
fmulp /* x * log2(e) */
fstl %st(1)
frndint /* int(x * log2(e)) */
fstl %st(2)
fsubrp /* fract(x * log2(e)) */
fsub %st,%st(1) /* fract(x * log2(e)) */
fxch
f2xm1 /* 2^(fract(x * log2(e))) - 1 */
fld1
faddp /* 2^(fract(x * log2(e))) */
@ -34,9 +34,8 @@ ENTRY(__ieee754_expf)
fstp %st(1)
ret
.LisInf:
andb $2, %ah /* Test sign. */
jz .LpInf /* If positive, jump. */
1: testl $0x200, %eax /* Test sign. */
jz 2f /* If positive, jump. */
fldz /* Set result to 0. */
.LpInf: ret
2: ret
END (__ieee754_expf)

View file

@ -18,16 +18,16 @@ ENTRY(__ieee754_expl)
-- drepper@cygnus.com. */
fxam /* Is NaN or +-Inf? */
fstsw %ax
sahf
jnc .LnoInfNaN /* No, jump. */
jp .LisInf /* Is +-Inf, jump. */
.LnoInfNaN:
movb $0x45, %dh
andb %ah, %dh
cmpb $0x05, %dh
je 1f /* Is +-Inf, jump. */
fldl2e
fmulp /* x * log2(e) */
fstl %st(1)
frndint /* int(x * log2(e)) */
fstl %st(2)
fsubrp /* fract(x * log2(e)) */
fsub %st,%st(1) /* fract(x * log2(e)) */
fxch
f2xm1 /* 2^(fract(x * log2(e))) - 1 */
fld1
faddp /* 2^(fract(x * log2(e))) */
@ -35,9 +35,8 @@ ENTRY(__ieee754_expl)
fstp %st(1)
ret
.LisInf:
andb $2, %ah /* Test sign. */
jz .LpInf /* If positive, jump. */
1: testl $0x200, %eax /* Test sign. */
jz 2f /* If positive, jump. */
fldz /* Set result to 0. */
.LpInf: ret
2: ret
END (__ieee754_expl)

View file

@ -53,7 +53,7 @@ ENTRY(__ieee754_log)
fyl2xp1 // log(x)
ret
2: fincstp // x : log(2)
2: fstp %st(0) // x : log(2)
fyl2x // log(x)
ret
END (__ieee754_log)

View file

@ -53,7 +53,7 @@ ENTRY(__ieee754_log10)
fyl2xp1 // log10(x)
ret
2: fincstp // x : log10(2)
2: fstp %st(0) // x : log10(2)
fyl2x // log10(x)
ret
END (__ieee754_log10)

View file

@ -54,7 +54,7 @@ ENTRY(__ieee754_log10f)
fyl2xp1 // log10(x)
ret
2: fincstp // x : log10(2)
2: fstp %st(0) // x : log10(2)
fyl2x // log10(x)
ret
END (__ieee754_log10f)

View file

@ -55,7 +55,7 @@ ENTRY(__ieee754_log10l)
fyl2xp1 // log10(x)
ret
2: fincstp // x : log10(2)
2: fstp %st(0) // x : log10(2)
fyl2x // log10(x)
ret
END(__ieee754_log10l)

View file

@ -54,7 +54,7 @@ ENTRY(__ieee754_logf)
fyl2xp1 // log(x)
ret
2: fincstp // x : log(2)
2: fstp %st(0) // x : log(2)
fyl2x // log(x)
ret
END (__ieee754_logf)

View file

@ -54,7 +54,7 @@ ENTRY(__ieee754_logl)
fyl2xp1 // log(x)
ret
2: fincstp // x : log(2)
2: fstp %st(0) // x : log(2)
fyl2x // log(x)
ret
END (__ieee754_logl)

120
sysdeps/libm-i387/e_pow.S Normal file
View file

@ -0,0 +1,120 @@
/* ix87 specific implementation of pow function.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
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. */
#include <machine/asm.h>
#ifdef __ELF__
.section .rodata
#else
.text
#endif
.align ALIGNARG(4)
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
ASM_TYPE_DIRECTIVE(limit,@object)
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
#ifdef PIC
#define MO(op) op##@GOTOFF(%ecx)
#else
#define MO(op) op
#endif
.text
ENTRY(__ieee754_pow)
fldl 4(%esp) // x
fldl 12(%esp) // y : x
#ifdef PIC
call 1f
1: popl %ecx
addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
#endif
subl $8,%esp
/* First see whether `y' is a natural number. In this case we
can use a more precise algorithm. */
fld %st // y : y : x
fistpll (%esp) // y : x
fildll (%esp) // int(y) : y : x
fucomp %st(1) // y : x
fnstsw
sahf
jne 2f
/* OK, we have an integer value for y. */
ftst // y : x
fstp %st(0) // x
fnstsw
sahf
popl %eax
popl %edx
jnc 4f // y >= 0, jump
fdivrl MO(one) // 1/x (now referred to as x)
negl %eax
adcl $0, %edx
negl %edx
4: fldl MO(one) // 1 : x
fxch
6: shrdl $1, %edx, %eax
jnc 5f
fxch
fmul %st(1) // x : ST*x
fxch
5: fmul %st(0), %st // x*x : ST*x
movl %eax, %ecx
orl %edx, %ecx
jnz 6b
fstp %st(0) // ST*x
ret
.align ALIGNARG(4)
2: /* y is a real number. */
fxch // x : y
fldl MO(one) // 1.0 : x : y
fld %st(1) // x : 1.0 : x : y
fsub %st(1) // x-1 : 1.0 : x : y
fabs // |x-1| : 1.0 : x : y
fcompl MO(limit) // 1.0 : x : y
fnstsw
fxch // x : 1.0 : y
sahf
ja 7f
fsub %st(1) // x-1 : 1.0 : y
fyl2xp1 // log2(x) : y
jmp 8f
7: fyl2x // log2(x) : y
8: fmul %st(1) // y*log2(x) : y
fst %st(1) // y*log2(x) : y*log2(x)
frndint // int(y*log2(x)) : y*log2(x)
fsubr %st, %st(1) // int(y*log2(x)) : fract(y*log2(x))
fxch // fract(y*log2(x)) : int(y*log2(x))
f2xm1 // 2^fract(y*log2(x))-1 : int(y*log2(x))
faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x))
fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x))
addl $8, %esp
fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x))
ret
END(__ieee754_pow)

120
sysdeps/libm-i387/e_powf.S Normal file
View file

@ -0,0 +1,120 @@
/* ix87 specific implementation of pow function.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
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. */
#include <machine/asm.h>
#ifdef __ELF__
.section .rodata
#else
.text
#endif
.align ALIGNARG(4)
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
ASM_TYPE_DIRECTIVE(limit,@object)
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
#ifdef PIC
#define MO(op) op##@GOTOFF(%ecx)
#else
#define MO(op) op
#endif
.text
ENTRY(__ieee754_powf)
flds 4(%esp) // x
flds 8(%esp) // y : x
#ifdef PIC
call 1f
1: popl %ecx
addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
#endif
subl $8,%esp
/* First see whether `y' is a natural number. In this case we
can use a more precise algorithm. */
fld %st // y : y : x
fistpll (%esp) // y : x
fildll (%esp) // int(y) : y : x
fucomp %st(1) // y : x
fnstsw
sahf
jne 2f
/* OK, we have an integer value for y. */
ftst // y : x
fstp %st(0) // x
fnstsw
sahf
popl %eax
popl %edx
jnc 4f // y >= 0, jump
fdivrl MO(one) // 1/x (now referred to as x)
negl %eax
adcl $0, %edx
negl %edx
4: fldl MO(one) // 1 : x
fxch
6: shrdl $1, %edx, %eax
jnc 5f
fxch
fmul %st(1) // x : ST*x
fxch
5: fmul %st(0), %st // x*x : ST*x
movl %eax, %ecx
orl %edx, %ecx
jnz 6b
fstp %st(0) // ST*x
ret
.align ALIGNARG(4)
2: /* y is a real number. */
fxch // x : y
fldl MO(one) // 1.0 : x : y
fld %st(1) // x : 1.0 : x : y
fsub %st(1) // x-1 : 1.0 : x : y
fabs // |x-1| : 1.0 : x : y
fcompl MO(limit) // 1.0 : x : y
fnstsw
fxch // x : 1.0 : y
sahf
ja 7f
fsub %st(1) // x-1 : 1.0 : y
fyl2xp1 // log2(x) : y
jmp 8f
7: fyl2x // log2(x) : y
8: fmul %st(1) // y*log2(x) : y
fst %st(1) // y*log2(x) : y*log2(x)
frndint // int(y*log2(x)) : y*log2(x)
fsubr %st, %st(1) // int(y*log2(x)) : fract(y*log2(x))
fxch // fract(y*log2(x)) : int(y*log2(x))
f2xm1 // 2^fract(y*log2(x))-1 : int(y*log2(x))
faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x))
fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x))
addl $8, %esp
fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x))
ret
END(__ieee754_powf)

120
sysdeps/libm-i387/e_powl.S Normal file
View file

@ -0,0 +1,120 @@
/* ix87 specific implementation of pow function.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
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. */
#include <machine/asm.h>
#ifdef __ELF__
.section .rodata
#else
.text
#endif
.align ALIGNARG(4)
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
ASM_TYPE_DIRECTIVE(limit,@object)
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
#ifdef PIC
#define MO(op) op##@GOTOFF(%ecx)
#else
#define MO(op) op
#endif
.text
ENTRY(__ieee754_powl)
fldt 4(%esp) // x
fldt 16(%esp) // y : x
#ifdef PIC
call 1f
1: popl %ecx
addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
#endif
subl $8,%esp
/* First see whether `y' is a natural number. In this case we
can use a more precise algorithm. */
fld %st // y : y : x
fistpll (%esp) // y : x
fildll (%esp) // int(y) : y : x
fucomp %st(1) // y : x
fnstsw
sahf
jne 2f
/* OK, we have an integer value for y. */
ftst // y : x
fstp %st(0) // x
fnstsw
sahf
popl %eax
popl %edx
jnc 4f // y >= 0, jump
fdivrl MO(one) // 1/x (now referred to as x)
negl %eax
adcl $0, %edx
negl %edx
4: fldl MO(one) // 1 : x
fxch
6: shrdl $1, %edx, %eax
jnc 5f
fxch
fmul %st(1) // x : ST*x
fxch
5: fmul %st(0), %st // x*x : ST*x
movl %eax, %ecx
orl %edx, %ecx
jnz 6b
fstp %st(0) // ST*x
ret
.align ALIGNARG(4)
2: /* y is a real number. */
fxch // x : y
fldl MO(one) // 1.0 : x : y
fld %st(1) // x : 1.0 : x : y
fsub %st(1) // x-1 : 1.0 : x : y
fabs // |x-1| : 1.0 : x : y
fcompl MO(limit) // 1.0 : x : y
fnstsw
fxch // x : 1.0 : y
sahf
ja 7f
fsub %st(1) // x-1 : 1.0 : y
fyl2xp1 // log2(x) : y
jmp 8f
7: fyl2x // log2(x) : y
8: fmul %st(1) // y*log2(x) : y
fst %st(1) // y*log2(x) : y*log2(x)
frndint // int(y*log2(x)) : y*log2(x)
fsubr %st, %st(1) // int(y*log2(x)) : fract(y*log2(x))
fxch // fract(y*log2(x)) : int(y*log2(x))
f2xm1 // 2^fract(y*log2(x))-1 : int(y*log2(x))
faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x))
fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x))
addl $8, %esp
fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x))
ret
END(__ieee754_powl)

View file

@ -101,7 +101,7 @@ ENTRY(__asinh)
fchs // x
4: fld %st // x : x
faddl MO(huge) // huge+x : x
fincstp // x
fstp %st(0) // x
ret
// |x| > 2^28 => y = sign(x) * (log(|x|) + log(2))

View file

@ -101,7 +101,7 @@ ENTRY(__asinhf)
fchs // x
4: fld %st // x : x
faddl MO(huge) // huge+x : x
fincstp // x
fstp %st(0) // x
ret
// |x| > 2^14 => y = sign(x) * (log(|x|) + log(2))

View file

@ -109,7 +109,7 @@ ENTRY(__asinhl)
4: fld %st // x : x
fldt MO(huge) // huge : x : x
faddp // huge+x : x
fincstp // x
fstp %st(0) // x
ret
// |x| > 2^34 => y = sign(x) * (log(|x|) + log(2))

View file

@ -8,27 +8,25 @@
RCSID("$NetBSD: s_ceil.S,v 1.4 1995/05/08 23:52:13 jtc Exp $")
ENTRY(__ceil)
pushl %ebp
movl %esp,%ebp
fldl 4(%esp)
subl $8,%esp
fstcw -4(%ebp) /* store fpu control word */
fstcw 4(%esp) /* store fpu control word */
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
than the 16 bit operations. */
movl -4(%ebp),%edx
orl $0x0800,%edx /* round towards +oo */
movl $0x0800,%edx /* round towards +oo */
orl 4(%esp),%edx
andl $0xfbff,%edx
movl %edx,-8(%ebp)
fldcw -8(%ebp) /* load modified control word */
movl %edx,(%esp)
fldcw (%esp) /* load modified control word */
fldl 8(%ebp); /* round */
frndint
frndint /* round */
fldcw -4(%ebp) /* restore original control word */
fldcw 4(%esp) /* restore original control word */
leave
addl $8,%esp
ret
END (__ceil)
weak_alias (__ceil, ceil)

View file

@ -8,27 +8,25 @@
RCSID("$NetBSD: s_ceilf.S,v 1.3 1995/05/08 23:52:44 jtc Exp $")
ENTRY(__ceilf)
pushl %ebp
movl %esp,%ebp
flds 4(%esp)
subl $8,%esp
fstcw -4(%ebp) /* store fpu control word */
fstcw 4(%esp) /* store fpu control word */
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
than the 16 bit operations. */
movl -4(%ebp),%edx
orl $0x0800,%edx /* round towards +oo */
movl $0x0800,%edx /* round towards +oo */
orl 4(%esp),%edx
andl $0xfbff,%edx
movl %edx,-8(%ebp)
fldcw -8(%ebp) /* load modified control word */
movl %edx,(%esp)
fldcw (%esp) /* load modified control word */
flds 8(%ebp); /* round */
frndint
frndint /* round */
fldcw -4(%ebp) /* restore original control word */
fldcw 4(%esp) /* restore original control word */
leave
addl $8,%esp
ret
END (__ceilf)
weak_alias (__ceilf, ceilf)

View file

@ -9,27 +9,25 @@
RCSID("$NetBSD: $")
ENTRY(__ceill)
pushl %ebp
movl %esp,%ebp
fldt 4(%esp)
subl $8,%esp
fstcw -4(%ebp) /* store fpu control word */
fstcw 4(%esp) /* store fpu control word */
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
than the 16 bit operations. */
movl -4(%ebp),%edx
orl $0x0800,%edx /* round towards +oo */
movl $0x0800,%edx /* round towards +oo */
orl 4(%esp),%edx
andl $0xfbff,%edx
movl %edx,-8(%ebp)
fldcw -8(%ebp) /* load modified control word */
movl %edx,(%esp)
fldcw (%esp) /* load modified control word */
fldt 8(%ebp); /* round */
frndint
frndint /* round */
fldcw -4(%ebp) /* restore original control word */
fldcw 4(%esp) /* restore original control word */
leave
addl $8,%esp
ret
END (__ceill)
weak_alias (__ceill, ceill)

View file

@ -0,0 +1,83 @@
/* ix87 specific implementation of exp(x)-1.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
Based on code by John C. Bowman <bowman@ipp-garching.mpg.de>.
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. */
/* Using: e^x - 1 = 2^(x * log2(e)) - 1 */
#include <machine/asm.h>
#ifdef __ELF__
.section .rodata
#else
.text
#endif
.align ALIGNARG(4)
ASM_TYPE_DIRECTIVE(zero,@object)
zero: .double 0.0
ASM_SIZE_DIRECTIVE(zero)
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
ASM_TYPE_DIRECTIVE(l2e,@object)
l2e: .tfloat 1.442695040888963407359924681002
ASM_SIZE_DIRECTIVE(l2e)
#ifdef PIC
#define MO(op) op##@GOTOFF(%edx)
#else
#define MO(op) op
#endif
.text
ENTRY(__expm1)
fldl 4(%esp) // x
fxam // Is NaN or +-Inf?
fstsw %ax
#ifdef PIC
call 1f
1: popl %edx
addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
#endif
movb $0x45, %ch
andb %ah, %ch
cmpb $0x05, %ch
je 2f // Is +-Inf, jump.
fldt MO(l2e) // log2(e) : x
fmulp // log2(e)*x
fld %st // log2(e)*x : log2(e)*x
frndint // int(log2(e)*x) : log2(e)*x
fsub %st, %st(1) // int(log2(e)*x) : fract(log2(e)*x)
fxch // fract(log2(e)*x) : int(log2(e)*x)
f2xm1 // 2^fract(log2(e)*x)-1 : int(log2(e)*x)
fscale // 2^(log2(e)*x)-2^int(log2(e)*x) : int(log2(e)*x)
fxch // int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x)
fldl MO(one) // 1 : int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x)
fscale // 2^int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x)
faddp // 2^(log2(e)*x)
fsubl MO(one)
ret
2: testl $0x200, %eax // Test sign.
jz 3f // If positive, jump.
fldl MO(zero) // Set result to 0.
3: ret
END(__expm1)
weak_alias (__expm1, expm1)

View file

@ -0,0 +1,83 @@
/* ix87 specific implementation of exp(x)-1.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
Based on code by John C. Bowman <bowman@ipp-garching.mpg.de>.
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. */
/* Using: e^x - 1 = 2^(x * log2(e)) - 1 */
#include <machine/asm.h>
#ifdef __ELF__
.section .rodata
#else
.text
#endif
.align ALIGNARG(4)
ASM_TYPE_DIRECTIVE(zero,@object)
zero: .double 0.0
ASM_SIZE_DIRECTIVE(zero)
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
ASM_TYPE_DIRECTIVE(l2e,@object)
l2e: .tfloat 1.442695040888963407359924681002
ASM_SIZE_DIRECTIVE(l2e)
#ifdef PIC
#define MO(op) op##@GOTOFF(%edx)
#else
#define MO(op) op
#endif
.text
ENTRY(__expm1f)
flds 4(%esp) // x
fxam // Is NaN or +-Inf?
fstsw %ax
#ifdef PIC
call 1f
1: popl %edx
addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
#endif
movb $0x45, %ch
andb %ah, %ch
cmpb $0x05, %ch
je 2f // Is +-Inf, jump.
fldt MO(l2e) // log2(e) : x
fmulp // log2(e)*x
fld %st // log2(e)*x : log2(e)*x
frndint // int(log2(e)*x) : log2(e)*x
fsub %st, %st(1) // int(log2(e)*x) : fract(log2(e)*x)
fxch // fract(log2(e)*x) : int(log2(e)*x)
f2xm1 // 2^fract(log2(e)*x)-1 : int(log2(e)*x)
fscale // 2^(log2(e)*x)-2^int(log2(e)*x) : int(log2(e)*x)
fxch // int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x)
fldl MO(one) // 1 : int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x)
fscale // 2^int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x)
faddp // 2^(log2(e)*x)
fsubl MO(one)
ret
2: testl $0x200, %eax // Test sign.
jz 3f // If positive, jump.
fldl MO(zero) // Set result to 0.
3: ret
END(__expm1f)
weak_alias (__expm1f, expm1f)

View file

@ -0,0 +1,83 @@
/* ix87 specific implementation of exp(x)-1.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
Based on code by John C. Bowman <bowman@ipp-garching.mpg.de>.
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. */
/* Using: e^x - 1 = 2^(x * log2(e)) - 1 */
#include <machine/asm.h>
#ifdef __ELF__
.section .rodata
#else
.text
#endif
.align ALIGNARG(4)
ASM_TYPE_DIRECTIVE(zero,@object)
zero: .double 0.0
ASM_SIZE_DIRECTIVE(zero)
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
ASM_TYPE_DIRECTIVE(l2e,@object)
l2e: .tfloat 1.442695040888963407359924681002
ASM_SIZE_DIRECTIVE(l2e)
#ifdef PIC
#define MO(op) op##@GOTOFF(%edx)
#else
#define MO(op) op
#endif
.text
ENTRY(__expm1l)
fldt 4(%esp) // x
fxam // Is NaN or +-Inf?
fstsw %ax
#ifdef PIC
call 1f
1: popl %edx
addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
#endif
movb $0x45, %ch
andb %ah, %ch
cmpb $0x05, %ch
je 2f // Is +-Inf, jump.
fldt MO(l2e) // log2(e) : x
fmulp // log2(e)*x
fld %st // log2(e)*x : log2(e)*x
frndint // int(log2(e)*x) : log2(e)*x
fsub %st, %st(1) // int(log2(e)*x) : fract(log2(e)*x)
fxch // fract(log2(e)*x) : int(log2(e)*x)
f2xm1 // 2^fract(log2(e)*x)-1 : int(log2(e)*x)
fscale // 2^(log2(e)*x)-2^int(log2(e)*x) : int(log2(e)*x)
fxch // int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x)
fldl MO(one) // 1 : int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x)
fscale // 2^int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x)
faddp // 2^(log2(e)*x)
fsubl MO(one)
ret
2: testl $0x200, %eax // Test sign.
jz 3f // If positive, jump.
fldl MO(zero) // Set result to 0.
3: ret
END(__expm1l)
weak_alias (__expm1l, expm1l)

View file

@ -8,23 +8,25 @@
RCSID("$NetBSD: s_floor.S,v 1.4 1995/05/09 00:01:59 jtc Exp $")
ENTRY(__floor)
pushl %ebp
movl %esp,%ebp
fldl 4(%esp)
subl $8,%esp
fstcw -4(%ebp) /* store fpu control word */
movw -4(%ebp),%dx
orw $0x0400,%dx /* round towards -oo */
andw $0xf7ff,%dx
movw %dx,-8(%ebp)
fldcw -8(%ebp) /* load modified control word */
fstcw 4(%esp) /* store fpu control word */
fldl 8(%ebp); /* round */
frndint
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
than the 16 bit operations. */
movl $0x400,%edx /* round towards -oo */
orl 4(%esp),%edx
andl $0xf7ff,%edx
movl %edx,(%esp)
fldcw (%esp) /* load modified control word */
fldcw -4(%ebp) /* restore original control word */
frndint /* round */
leave
fldcw 4(%esp) /* restore original control word */
addl $8,%esp
ret
END (__floor)
weak_alias (__floor, floor)

View file

@ -8,23 +8,25 @@
RCSID("$NetBSD: s_floorf.S,v 1.3 1995/05/09 00:04:32 jtc Exp $")
ENTRY(__floorf)
pushl %ebp
movl %esp,%ebp
flds 4(%esp)
subl $8,%esp
fstcw -4(%ebp) /* store fpu control word */
movw -4(%ebp),%dx
orw $0x0400,%dx /* round towards -oo */
andw $0xf7ff,%dx
movw %dx,-8(%ebp)
fldcw -8(%ebp) /* load modified control word */
fstcw 4(%esp) /* store fpu control word */
flds 8(%ebp); /* round */
frndint
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
than the 16 bit operations. */
movl $0x400,%edx /* round towards -oo */
orl 4(%esp),%edx
andl $0xf7ff,%edx
movl %edx,(%esp)
fldcw (%esp) /* load modified control word */
fldcw -4(%ebp) /* restore original control word */
frndint /* round */
leave
fldcw 4(%esp) /* restore original control word */
addl $8,%esp
ret
END (__floorf)
weak_alias (__floorf, floorf)

View file

@ -9,23 +9,25 @@
RCSID("$NetBSD: $")
ENTRY(__floorl)
pushl %ebp
movl %esp,%ebp
fldt 4(%esp)
subl $8,%esp
fstcw -4(%ebp) /* store fpu control word */
movw -4(%ebp),%dx
orw $0x0400,%dx /* round towards -oo */
andw $0xf7ff,%dx
movw %dx,-8(%ebp)
fldcw -8(%ebp) /* load modified control word */
fstcw 4(%esp) /* store fpu control word */
fldt 8(%ebp) /* round */
frndint
/* We use here %edx although only the low 1 bits are defined.
But none of the operations should care and they are faster
than the 16 bit operations. */
movl $0x400,%edx /* round towards -oo */
orl 4(%esp),%edx
andl $0xf7ff,%edx
movl %edx,(%esp)
fldcw (%esp) /* load modified control word */
fldcw -4(%ebp) /* restore original control word */
frndint /* round */
leave
fldcw 4(%esp) /* restore original control word */
addl $8,%esp
ret
END (__floorl)
weak_alias (__floorl, floorl)

View file

@ -11,7 +11,7 @@ RCSID("$NetBSD: $")
ENTRY(__significandl)
fldt 4(%esp)
fxtract
fincstp
fstp %st(0)
ret
END (__significandl)
weak_alias (__significandl, significandl)

View file

@ -8,20 +8,20 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: e_coshf.c,v 1.5 1995/05/10 20:45:01 jtc Exp $";
static char rcsid[] = "$NetBSD: e_coshf.c,v 1.6 1996/04/08 15:43:41 phil Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const volatile float huge = 1.0e30;
static const float huge = 1.0e30;
static const float one = 1.0, half=0.5;
#else
static float one = 1.0, half=0.5, huge = 1.0e30;
@ -33,7 +33,7 @@ static float one = 1.0, half=0.5, huge = 1.0e30;
float __ieee754_coshf(x)
float x;
#endif
{
{
float t,w;
int32_t ix;
@ -41,7 +41,7 @@ static float one = 1.0, half=0.5, huge = 1.0e30;
ix &= 0x7fffffff;
/* x is INF or NaN */
if(ix>=0x7f800000) return x*x;
if(ix>=0x7f800000) return x*x;
/* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */
if(ix<0x3eb17218) {

View file

@ -8,19 +8,19 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: e_expf.c,v 1.5 1995/05/10 20:45:05 jtc Exp $";
static char rcsid[] = "$NetBSD: e_expf.c,v 1.6 1996/04/08 15:43:43 phil Exp $";
#endif
#include "math.h"
#include "math_private.h"
static const volatile float huge = 1.0e+30;
static const float huge = 1.0e+30;
#ifdef __STDC__
static const float
@ -69,7 +69,7 @@ P5 = 4.1381369442e-08; /* 0x3331bb4c */
}
/* argument reduction */
if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */
if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */
if(hx < 0x3F851592) { /* and |x| < 1.5 ln2 */
hi = x-ln2HI[xsb]; lo=ln2LO[xsb]; k = 1-xsb-xsb;
} else {
@ -79,7 +79,7 @@ P5 = 4.1381369442e-08; /* 0x3331bb4c */
lo = t*ln2LO[0];
}
x = hi - lo;
}
}
else if(hx < 0x31800000) { /* when |x|<2**-28 */
if(huge+x>one) return one+x;/* trigger inexact */
}
@ -88,7 +88,7 @@ P5 = 4.1381369442e-08; /* 0x3331bb4c */
/* x is now in primary range */
t = x*x;
c = x - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));
if(k==0) return one-((x*c)/(c-(float)2.0)-x);
if(k==0) return one-((x*c)/(c-(float)2.0)-x);
else y = one-((lo-(x*c)/((float)2.0-c))-hi);
if(k >= -125) {
u_int32_t hy;

View file

@ -5,7 +5,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@ -16,12 +16,12 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
/* __ieee754_hypot(x,y)
*
* Method :
* If (assume round-to-nearest) z=x*x+y*y
* has error less than sqrt(2)/2 ulp, than
* Method :
* If (assume round-to-nearest) z=x*x+y*y
* has error less than sqrt(2)/2 ulp, than
* sqrt(z) has error less than 1 ulp (exercise).
*
* So, compute sqrt(x*x+y*y) with some care as
* So, compute sqrt(x*x+y*y) with some care as
* follows to get the error below 1 ulp:
*
* Assume x>y>0;
@ -31,10 +31,10 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
* where x1 = x with lower 32 bits cleared, x2 = x-x1; else
* 2. if x <= 2y use
* t1*y1+((x-y)*(x-y)+(t1*y2+t2*y))
* where t1 = 2x with lower 32 bits cleared, t2 = 2x-t1,
* where t1 = 2x with lower 32 bits cleared, t2 = 2x-t1,
* y1= y with lower 32 bits chopped, y2 = y-y1.
*
* NOTE: scaling may be necessary if some argument is too
*
* NOTE: scaling may be necessary if some argument is too
* large or too tiny
*
* Special cases:
@ -42,8 +42,8 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
* hypot(x,y) is NAN if x or y is NAN.
*
* Accuracy:
* hypot(x,y) returns sqrt(x^2+y^2) with error less
* than 1 ulps (units in the last place)
* hypot(x,y) returns sqrt(x^2+y^2) with error less
* than 1 ulps (units in the last place)
*/
#include "math.h"
@ -56,7 +56,7 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
double x, y;
#endif
{
double a=x,b=y,t1,t2,y1,y2,w;
double a,b,t1,t2,y1,y2,w;
int32_t j,k,ha,hb;
GET_HIGH_WORD(ha,x);
@ -84,7 +84,7 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
SET_HIGH_WORD(b,hb);
}
if(hb < 0x20b00000) { /* b < 2**-500 */
if(hb <= 0x000fffff) { /* subnormal b or 0 */
if(hb <= 0x000fffff) { /* subnormal b or 0 */
u_int32_t low;
GET_LOW_WORD(low,b);
if((hb|low)==0) return a;

View file

@ -8,7 +8,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@ -27,7 +27,7 @@ static char rcsid[] = "$NetBSD: e_hypotf.c,v 1.5 1995/05/12 04:57:30 jtc Exp $";
float x, y;
#endif
{
float a=x,b=y,t1,t2,y1,y2,w;
float a,b,t1,t2,y1,y2,w;
int32_t j,k,ha,hb;
GET_FLOAT_WORD(ha,x);
@ -52,7 +52,7 @@ static char rcsid[] = "$NetBSD: e_hypotf.c,v 1.5 1995/05/12 04:57:30 jtc Exp $";
SET_FLOAT_WORD(b,hb);
}
if(hb < 0x26800000) { /* b < 2**-50 */
if(hb <= 0x007fffff) { /* subnormal b or 0 */
if(hb <= 0x007fffff) { /* subnormal b or 0 */
if(hb==0) return a;
SET_FLOAT_WORD(t1,0x3f000000); /* t1=2^126 */
b *= t1;

View file

@ -0,0 +1,133 @@
/* e_hypotl.c -- long double version of e_hypot.c.
* Conversion to long double by Ulrich Drepper,
* Cygnus Support, drepper@cygnus.com.
*/
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: $";
#endif
/* __ieee754_hypotl(x,y)
*
* Method :
* If (assume round-to-nearest) z=x*x+y*y
* has error less than sqrt(2)/2 ulp, than
* sqrt(z) has error less than 1 ulp (exercise).
*
* So, compute sqrt(x*x+y*y) with some care as
* follows to get the error below 1 ulp:
*
* Assume x>y>0;
* (if possible, set rounding to round-to-nearest)
* 1. if x > 2y use
* x1*x1+(y*y+(x2*(x+x1))) for x*x+y*y
* where x1 = x with lower 32 bits cleared, x2 = x-x1; else
* 2. if x <= 2y use
* t1*y1+((x-y)*(x-y)+(t1*y2+t2*y))
* where t1 = 2x with lower 32 bits cleared, t2 = 2x-t1,
* y1= y with lower 32 bits chopped, y2 = y-y1.
*
* NOTE: scaling may be necessary if some argument is too
* large or too tiny
*
* Special cases:
* hypot(x,y) is INF if x or y is +INF or -INF; else
* hypot(x,y) is NAN if x or y is NAN.
*
* Accuracy:
* hypot(x,y) returns sqrt(x^2+y^2) with error less
* than 1 ulps (units in the last place)
*/
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
long double __ieee754_hypotl(long double x, long double y)
#else
long double __ieee754_hypotl(x,y)
long double x, y;
#endif
{
long double a,b,t1,t2,y1,y2,w;
u_int32_t j,k,ea,eb;
GET_LDOUBLE_EXP(ea,x);
ea &= 0x7fff;
GET_LDOUBLE_EXP(eb,y);
eb &= 0x7fff;
if(eb > ea) {a=y;b=x;j=ea; ea=eb;eb=j;} else {a=x;b=y;}
SET_LDOUBLE_EXP(a,ea); /* a <- |a| */
SET_LDOUBLE_EXP(b,eb); /* b <- |b| */
if((ea-eb)>0x46) {return a+b;} /* x/y > 2**70 */
k=0;
if(ea > 0x5f3f) { /* a>2**8000 */
if(ea == 0x7fff) { /* Inf or NaN */
u_int32_t exp,high,low;
w = a+b; /* for sNaN */
GET_LDOUBLE_WORDS(exp,high,low,a);
if(((high&0x7fffffff)|low)==0) w = a;
GET_LDOUBLE_WORDS(exp,high,low,b);
if(((eb^0x7fff)|(high&0x7fffffff)|low)==0) w = b;
return w;
}
/* scale a and b by 2**-9600 */
ea -= 0x2580; eb -= 0x2580; k += 9600;
SET_LDOUBLE_EXP(a,ea);
SET_LDOUBLE_EXP(b,eb);
}
if(eb < 0x20bf) { /* b < 2**-8000 */
if(eb == 0) { /* subnormal b or 0 */
u_int32_t exp,high,low;
GET_LDOUBLE_WORDS(exp,high,low,b);
if((high|low)==0) return a;
SET_LDOUBLE_WORDS(t1, 0x7ffd, 0, 0); /* t1=2^16382 */
b *= t1;
a *= t1;
k -= 16382;
} else { /* scale a and b by 2^9600 */
ea += 0x2580; /* a *= 2^9600 */
eb += 0x2580; /* b *= 2^9600 */
k -= 9600;
SET_LDOUBLE_EXP(a,ea);
SET_LDOUBLE_EXP(b,eb);
}
}
/* medium size a and b */
w = a-b;
if (w>b) {
u_int32_t high;
GET_LDOUBLE_MSW(high,a);
SET_LDOUBLE_WORDS(t1,ea,high,0);
t2 = a-t1;
w = __ieee754_sqrtl(t1*t1-(b*(-b)-t2*(a+t1)));
} else {
u_int32_t high;
GET_LDOUBLE_MSW(high,b);
a = a+a;
SET_LDOUBLE_WORDS(y1,eb,high,0);
y2 = b - y1;
GET_LDOUBLE_MSW(high,a);
SET_LDOUBLE_WORDS(t1,ea+1,high,0);
t2 = a - t1;
w = __ieee754_sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b)));
}
if(k!=0) {
u_int32_t exp;
t1 = 1.0;
GET_LDOUBLE_EXP(exp,t1);
SET_LDOUBLE_EXP(t1,exp+k);
return t1*w;
} else return w;
}

View file

@ -14,13 +14,13 @@
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: e_powf.c,v 1.6 1995/05/12 04:57:35 jtc Exp $";
static char rcsid[] = "$NetBSD: e_powf.c,v 1.7 1996/04/08 15:43:44 phil Exp $";
#endif
#include "math.h"
#include "math_private.h"
static const volatile float huge = 1.0e+30, tiny = 1.0e-30;
static const float huge = 1.0e+30, tiny = 1.0e-30;
#ifdef __STDC__
static const float

View file

@ -0,0 +1,91 @@
/* e_asinhl.c -- long double version of e_asinh.c.
* Conversion to long double by Ulrich Drepper,
* Cygnus Support, drepper@cygnus.com.
*/
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: $";
#endif
/* __ieee754_sinhl(x)
* Method :
* mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
* 1. Replace x by |x| (sinhl(-x) = -sinhl(x)).
* 2.
* E + E/(E+1)
* 0 <= x <= 25 : sinhl(x) := --------------, E=expm1l(x)
* 2
*
* 25 <= x <= lnovft : sinhl(x) := expl(x)/2
* lnovft <= x <= ln2ovft: sinhl(x) := expl(x/2)/2 * expl(x/2)
* ln2ovft < x : sinhl(x) := x*shuge (overflow)
*
* Special cases:
* sinhl(x) is |x| if x is +INF, -INF, or NaN.
* only sinhl(0)=0 is exact for finite x.
*/
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const long double one = 1.0, shuge = 1.0e4931L;
#else
static long double one = 1.0, shuge = 1.0e4931L;
#endif
#ifdef __STDC__
long double __ieee754_sinhl(long double x)
#else
long double __ieee754_sinhl(x)
long double x;
#endif
{
long double t,w,h;
u_int32_t jx,ix,i0,i1;
/* Words of |x|. */
GET_LDOUBLE_WORDS(jx,i0,i1,x);
ix = jx&0x7fff;
/* x is INF or NaN */
if(ix==0x7fff) return x+x;
h = 0.5;
if (jx<0) h = -h;
/* |x| in [0,25], return sign(x)*0.5*(E+E/(E+1))) */
if (ix < 0x4003 || (ix == 0x4003 && i0 <= 0xc8000000)) { /* |x|<25 */
if (ix<0x3fe3) /* |x|<2**-28 */
if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */
t = __expm1l(fabsl(x));
if(ix<0x3fff) return h*(2.0*t-t*t/(t+one));
return h*(t+t/(t+one));
}
/* |x| in [25, log(maxdouble)] return 0.5*exp(|x|) */
if (ix < 0x400c || (ix == 0x400c && i0 < 0xb17217f7))
return h*__ieee754_expl(fabsl(x));
/* |x| in [log(maxdouble), overflowthresold] */
if (ix<0x400c || (ix == 0x400c && (i0 < 0xb174ddc0
|| (i0 == 0xb174ddc0
&& i1 <= 0x31aec0ea)))) {
w = __ieee754_expl(0.5*fabsl(x));
t = h*w;
return t*w;
}
/* |x| > overflowthresold, sinhl(x) overflow */
return x*shuge;
}

View file

@ -12,9 +12,9 @@
# 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.
# 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.
# The mpn functions need this. All existing 68k ports use MIT syntax. If
# a new port wants to use Motorola or Sony syntax, it can redefine this
@ -30,3 +30,7 @@ CFLAGS-setjmp.c := -fno-omit-frame-pointer
# The 68k `long double' is a distinct type we support.
long-double-fcts = yes
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -Wno-uninitialized
endif

View file

@ -34,7 +34,7 @@ __sigpause (sig_or_mask, is_sig)
/* The modern X/Open implementation is requested. */
if (sigprocmask (0, NULL, &set) < 0
/* Yes, we call `sigaddset' and not `__sigaddset'. */
|| sigaddset (&set, sig_or_mask) < 0)
|| sigdelset (&set, sig_or_mask) < 0)
return -1;
}
else
@ -54,3 +54,16 @@ __sigpause (sig_or_mask, is_sig)
return sigsuspend (&set);
}
/* We have to provide a default version of this function since the
standards demand it. The version which is a bit more reasonable is
the BSD version. So make this the default. */
int __default_sigpause __P ((int mask));
int
__default_sigpause (mask)
int mask;
{
return __sigpause (mask, 0);
}
weak_alias (__default_sigpause, sigpause)

View file

@ -1,11 +0,0 @@
#include <math.h>
#include <stdio.h>
long double
__ieee754_hypotl (long double x, long double y)
{
fputs ("__ieee754_hypotl not implemented\n", stderr);
return 0.0;
}
stub_warning (__ieee754_hypotl)

View file

@ -1,11 +0,0 @@
#include <math.h>
#include <stdio.h>
long double
__ieee754_sinhl (long double x)
{
fputs ("__ieee754_sinhl not implemented\n", stderr);
return 0.0;
}
stub_warning (__ieee754_sinhl)

View file

@ -1,4 +1,4 @@
# @(#)asia 7.26
# @(#)asia 7.27
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
@ -354,6 +354,26 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov
9:00 - JAYT
# Iran
# From Paul Eggert (1996-12-17), following up a suggestion by Rich Wales:
# Ahmad Alavi <URL:http://tehran.stanford.edu/Iran_Lib/Calendar/taghveem.txt>
# (1993-08-04) writes ``Daylight saving time in Iran starts from the first day
# of Farvardin and ends the first day of Mehr.'' This disagrees with the SSIM:
#
# DST start DST end
# year SSIM Alavi SSIM Alavi
# 1991 05-03!= 03-21 09-20!= 09-23
# 1992 03-22!= 03-21 09-23 09-23
# 1993 03-21 03-21 09-23 09-23
# 1994 03-21 03-21 09-22!= 09-23
# 1995 03-21 03-21 09-22!= 09-23
# 1996 03-21!= 03-20 09-21!= 09-22
# 1997 03-21 03-21 09-21!= 09-23
#
# Go with Alavi starting with 1992.
# I used Ed Reingold's cal-persia in GNU Emacs 19.34 to compute Persian dates.
# The Persian calendar is based on the sun, and dates after around 2050
# are approximate; stop after 2037 when 32-bit time_t's overflow.
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Iran 1978 1980 - Mar 21 0:00 1:00 S
Rule Iran 1978 only - Oct 21 0:00 0 -
@ -361,11 +381,50 @@ Rule Iran 1979 only - Sep 19 0:00 0 -
Rule Iran 1980 only - Sep 23 0:00 0 -
Rule Iran 1991 only - May 3 0:00s 1:00 S
Rule Iran 1991 only - Sep 20 0:00s 0 -
Rule Iran 1992 only - Mar 22 0:00 1:00 S
Rule Iran 1992 1993 - Sep 23 0:00 0 -
Rule Iran 1993 max - Mar 21 0:00 1:00 S
Rule Iran 1994 1995 - Sep 22 0:00 0 -
Rule Iran 1996 max - Sep 21 0:00 0 -
Rule Iran 1992 1995 - Mar 21 0:00 1:00 S
Rule Iran 1992 1995 - Sep 23 0:00 0 -
Rule Iran 1996 only - Mar 20 0:00 1:00 S
Rule Iran 1996 only - Sep 22 0:00 0 -
Rule Iran 1997 1999 - Mar 21 0:00 1:00 S
Rule Iran 1997 1999 - Sep 23 0:00 0 -
Rule Iran 2000 only - Mar 20 0:00 1:00 S
Rule Iran 2000 only - Sep 22 0:00 0 -
Rule Iran 2001 2003 - Mar 21 0:00 1:00 S
Rule Iran 2001 2003 - Sep 23 0:00 0 -
Rule Iran 2004 only - Mar 20 0:00 1:00 S
Rule Iran 2004 only - Sep 22 0:00 0 -
Rule Iran 2005 2007 - Mar 21 0:00 1:00 S
Rule Iran 2005 2007 - Sep 23 0:00 0 -
Rule Iran 2008 only - Mar 20 0:00 1:00 S
Rule Iran 2008 only - Sep 22 0:00 0 -
Rule Iran 2009 2011 - Mar 21 0:00 1:00 S
Rule Iran 2009 2011 - Sep 23 0:00 0 -
Rule Iran 2012 only - Mar 20 0:00 1:00 S
Rule Iran 2012 only - Sep 22 0:00 0 -
Rule Iran 2013 2015 - Mar 21 0:00 1:00 S
Rule Iran 2013 2015 - Sep 23 0:00 0 -
Rule Iran 2016 only - Mar 20 0:00 1:00 S
Rule Iran 2016 only - Sep 22 0:00 0 -
Rule Iran 2017 2019 - Mar 21 0:00 1:00 S
Rule Iran 2017 2019 - Sep 23 0:00 0 -
Rule Iran 2020 only - Mar 20 0:00 1:00 S
Rule Iran 2020 only - Sep 22 0:00 0 -
Rule Iran 2021 2023 - Mar 21 0:00 1:00 S
Rule Iran 2021 2023 - Sep 23 0:00 0 -
Rule Iran 2024 2025 - Mar 20 0:00 1:00 S
Rule Iran 2024 2025 - Sep 22 0:00 0 -
Rule Iran 2026 2027 - Mar 21 0:00 1:00 S
Rule Iran 2026 2027 - Sep 23 0:00 0 -
Rule Iran 2028 2029 - Mar 20 0:00 1:00 S
Rule Iran 2028 2029 - Sep 22 0:00 0 -
Rule Iran 2030 2031 - Mar 21 0:00 1:00 S
Rule Iran 2030 2031 - Sep 23 0:00 0 -
Rule Iran 2032 2033 - Mar 20 0:00 1:00 S
Rule Iran 2032 2033 - Sep 22 0:00 0 -
Rule Iran 2034 2035 - Mar 21 0:00 1:00 S
Rule Iran 2034 2035 - Sep 23 0:00 0 -
Rule Iran 2036 2037 - Mar 20 0:00 1:00 S
Rule Iran 2036 2037 - Sep 22 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Tehran 3:25:44 - LMT 1916
3:25:44 - TMT 1946 # Tehran Mean Time
@ -492,7 +551,7 @@ Rule Zion 1995 only - Sep 3 0:00 0 S
#
# ftp://ftp.huji.ac.il/pub/misc/timezones/announcements/1996-1998.ps.gz
#
# Emptor Caveat: The dates for the years 1996-1998 were originally announced
# Caveat emptor: The dates for the years 1996-1998 were originally announced
# on 1995-08-31, by the previous Minister of Interior. The new Minister
# of Interior changed the dates on 1996-01-01, to take into account the
# desires of certain portions of Israeli society (the next election is in the

View file

@ -1,4 +1,4 @@
# @(#)australasia 7.30
# @(#)australasia 7.31
# This file also includes Pacific islands.
# Notes are at the end of this file
@ -48,15 +48,15 @@ Zone Australia/Perth 7:43:24 - LMT 1895 Dec
# so use Lindeman.
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule QL 1989 1991 - Oct lastSun 2:00s 1:00 -
Rule QL 1990 1992 - Mar Sun>=1 2:00s 0 -
Rule AQ 1989 1991 - Oct lastSun 2:00s 1:00 -
Rule AQ 1990 1992 - Mar Sun>=1 2:00s 0 -
Rule Holiday 1989 1993 - Oct lastSun 2:00s 1:00 -
Rule Holiday 1990 1994 - Mar Sun>=1 2:00s 0 -
Zone Australia/Brisbane 10:12:08 - LMT 1895
10:00 - EST 1917 Jan 1 0:01
10:00 Aus EST 1971 Oct lastSun 2:00s
10:00 1:00 EST 1972 Feb lastSun 2:00s
10:00 QL EST
10:00 AQ EST
Zone Australia/Lindeman 9:55:56 - LMT 1895
10:00 - EST 1917 Jan 1 0:01
10:00 Aus EST 1971 Oct lastSun 2:00s
@ -339,7 +339,7 @@ Zone Pacific/Palau 8:57:56 - LMT 1901 # Koror
9:00 - PWT # Palau Time
# Palmyra
# uninhabited since World War II; was probably like Pacific/Kiritmati
# uninhabited since World War II; was probably like Pacific/Kiritimati
# Papua New Guinea
# Zone NAME GMTOFF RULES FORMAT [UNTIL]

View file

@ -1,28 +1,30 @@
/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1991, 1994, 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 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.
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. */
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. */
#include <ansidecl.h>
#include <time.h>
#include <values.h>
/* Return the difference between TIME1 and TIME0. */
double
DEFUN(difftime, (time1, time0), time_t time1 AND time_t time0)
difftime (time1, time0)
time_t time1;
time_t time0;
{
/* Algorithm courtesy Paul Eggert (eggert@twinsun.com). */
@ -30,8 +32,8 @@ DEFUN(difftime, (time1, time0), time_t time1 AND time_t time0)
if (sizeof (time_t) < sizeof (double))
return (double) time1 - (double) time0;
if (sizeof (time_t) < sizeof (LONG_DOUBLE))
return (LONG_DOUBLE) time1 - (LONG_DOUBLE) time0;
if (sizeof (time_t) < sizeof (long double))
return (long double) time1 - (long double) time0;
if (time1 < time0)
return - difftime (time0, time1);
@ -43,9 +45,7 @@ DEFUN(difftime, (time1, time0), time_t time1 AND time_t time0)
return delta;
/* Repair delta overflow. */
hibit = 1;
while ((hibit <<= 1) > 0)
continue;
hibit = (~ (time_t) 0) << (_TYPEBITS (time_t) - 1);
/* The following expression rounds twice, which means the result may not
be the closest to the true answer. For example, suppose time_t is
@ -62,5 +62,5 @@ DEFUN(difftime, (time1, time0), time_t time1 AND time_t time0)
round twice when converting large unsigned types to small floating
types, so if time_t is unsigned the "return delta" above has the same
double-rounding problem. */
return delta - 2 * (LONG_DOUBLE) hibit;
return delta - 2 * (long double) hibit;
}

View file

@ -1,4 +1,4 @@
# @(#)europe 7.41
# @(#)europe 7.42
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
@ -78,7 +78,7 @@
# of the text said:
#
# `An old stone obelisk marking a forgotten terrestrial meridian stands
# beside the river at Kew. In the 18th century, before time and longditude
# beside the river at Kew. In the 18th century, before time and longitude
# was standardised by the Royal Observatory in Greenwich, scholars observed
# this stone and the movement of stars from Kew Observatory nearby. They
# made their calculations and set the time for the Horse Guards and Parliament,
@ -86,7 +86,7 @@
# along the towpath within a few yards of it.'
#
# I have a one inch to one mile map of London and my estimate of the stone's
# position is 51 deg. 28' 30" N, 0 deg. 18' 45" W. The longditude should
# position is 51 deg. 28' 30" N, 0 deg. 18' 45" W. The longitude should
# be within about +-2". The Ordnance Survey grid reference is TQ172761.
#
# [This yields GMTOFF = -0:01:15 for London LMT in the 18th century.]
@ -167,7 +167,7 @@
# It ends at 02:00 GMT on the morning of the day after the fourth Saturday
# in October. (All the redundant `morning of the day ...' is in the Act.)
# This is only of passing interest now as it will always be overridden by
# an Order in Council (a Statutary Instrument, the SI thing mentioned above)
# an Order in Council (a Statutory Instrument, the SI thing mentioned above)
# to specify the EC specified dates.
# From Peter Ilieve <peter@memex.co.uk> (1993-10-18):
@ -327,7 +327,7 @@
# so that part of the 1922 Act will still apply.
#
# - The Defence (Summer Time) Regulations, 1939, SR&O 1939 No. 1379
# [SR&O == Statutary Regulation and Order]
# [SR&O == Statutory Regulation and Order]
#
# These were made under the Emergency Powers (Defence) Act, 1939.
# It changes the end date to be the day after the third Saturday in November.
@ -403,7 +403,7 @@
# harmonise with the EC since 1981. The major change is that the time changes
# to 01:00 GMT.)
#
# - The Summer Time Order, 1992, SI 1992/1729 [SI == Statutary Instrument]
# - The Summer Time Order, 1992, SI 1992/1729 [SI == Statutory Instrument]
#
# This specifies dates of:
# Start End
@ -1298,7 +1298,7 @@ Zone Europe/Athens 1:34:52 - LMT 1895 Sep 14
1:00 Greece CE%sT 1944 Apr 4
2:00 Greece EE%sT 1981
# Shanks says they switched to C-Eur in 1981;
# go with EU intead, since Greece joined it on Jan 1.
# go with EU instead, since Greece joined it on Jan 1.
2:00 EU EE%sT
# Hungary
@ -1819,9 +1819,15 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
2:00 E-Eur EE%sT
# Russia
# From Shanks (1991):
# In 1929 the Soviet Union instituted a 5 day week; in 1932 it instituted
# a 6 day week; on 1940-06-27 it returned to the Gregorian week.
# From Chris Carrier <72157.3334@CompuServe.COM> (1996-12-02):
# On 1929-10-01 the Soviet Union instituted an ``Eternal Calendar''
# with 30-day months plus 5 holidays, with a 5-day week.
# On 1931-12-01 it changed to a 6-day week; in 1934 it reverted to the
# Gregorian calendar while retaining the 6-day week; on 1940-06-27 it
# reverted to the 7-day week. With the 6-day week the usual days
# off were the 6th, 12th, 18th, 24th and 30th of the month.
# (Source: Evitiar Zerubavel, _The Seven Day Circle_)
#
# From Paul Eggert <eggert@twinsun.com> (1996-11-22):
# Except for Moscow after 1919-07-01, I invented the time zone abbreviations,
@ -1882,7 +1888,7 @@ Zone Asia/Omsk 4:53:36 - LMT 1924 May 2
# as far as I remember it was done exactly during winter->summer switching
# so we (Novosibirsk) simply did not switch.
Zone Asia/Novosibirsk 5:31:40 - LMT 1924 May 2
6:00 - NOVT 1957 Mar # Novosibirsk TIme
6:00 - NOVT 1957 Mar # Novosibirsk Time
7:00 Russia NOV%sT 1991 Mar 31 2:00s
6:00 1:00 NOVST 1991 Sep 29 2:00s
6:00 - NOVT 1992 Jan 19 2:00s
@ -2134,7 +2140,7 @@ Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
# Ukraine
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Ukraine 1917 only - Jul 1 23:00 1:00 UST # Ukrainian Summer Time
Rule Ukraine 1917 only - Dec 28 0:00 0 KMT # Kiev Mean TIme
Rule Ukraine 1917 only - Dec 28 0:00 0 KMT # Kiev Mean Time
Rule Ukraine 1918 only - May 31 22:00 2:00 UDST # Ukrainian Double Summer Time
Rule Ukraine 1918 only - Sep 17 0:00 1:00 UST
Rule Ukraine 1919 only - May 31 23:00 2:00 UDST

View file

@ -1,4 +1,4 @@
# @(#)northamerica 7.29
# @(#)northamerica 7.30
# also includes Central America and the Caribbean
# This data is by no means authoritative; if you think you know better,
@ -920,9 +920,9 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# MEXICO BAJA CAL N 7 H BEHIND UTC BAJA CALIFORNIA SUR AND
# MEXICO BAJA CAL N N. PACIFIC COAST (STATES
# MEXICO BAJA CAL N OF SINALOA AND SONORA)
# MEXICO BAJA CAL N 8 H BEHIND UTC ABOVE 28TH PARALLAL APR 3
# MEXICO BAJA CAL N 8 H BEHIND UTC ABOVE 28TH PARALLEL APR 3
# MEXICO BAJA CAL N - OCT 29
# MEXICO BAJA CAL N 7 H BEHIND UTC ABOVE 28TH PARALLAL APR 3
# MEXICO BAJA CAL N 7 H BEHIND UTC ABOVE 28TH PARALLEL APR 3
# MEXICO BAJA CAL N - 0CT 29
# MEXICO 6 H BEHIND UTC STATES OF DURANGO,
# MEXICO COAHUILA, NUEVO LEON,

View file

@ -1,4 +1,4 @@
# @(#)southamerica 7.15
# @(#)southamerica 7.16
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
@ -61,7 +61,7 @@
# ARGENTINA 3 H BEHIND UTC
# From Hernan G. Otero <hernan@isoft.com.ar> (1995-06-26):
# I am sending modifications to the Argentinian time zone table...
# I am sending modifications to the Argentine time zone table...
# AR was chosen because they are the ISO letters that represent Argentina.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@ -99,7 +99,7 @@ Rule Arg 1988 only - Dec 1 0:00 1:00 S
# These corrections were contributed by InterSoft Argentina S.A.,
# obtaining the data from the:
# Talleres de Hidrografia Naval Argentina
# (Argentinian Naval Hydrography Institute)
# (Argentine Naval Hydrography Institute)
#
# Shanks gives 1989 Mar 16 and stops after 1990 Mar 4; go with Otero.
Rule Arg 1989 1993 - Mar Sun>=1 0:00 0 -

View file

@ -1,6 +1,6 @@
#ifndef lint
#ifndef NOID
static char elsieid[] = "@(#)zic.c 7.79";
static char elsieid[] = "@(#)zic.c 7.80";
#endif /* !defined NOID */
#endif /* !defined lint */
@ -1697,7 +1697,7 @@ const int zonecount;
(void) strcpy(startbuf, zp->z_format);
eat(zp->z_filename, zp->z_linenum);
if (*startbuf == '\0')
error(_("can't determine time zone abbrevation to use just after until time"));
error(_("can't determine time zone abbreviation to use just after until time"));
else addtt(starttime,
addtype(startoff, startbuf,
startoff != zp->z_gmtoff,

View file

@ -35,11 +35,11 @@
#define DOUBLEBITS _TYPEBITS (double)
#define FLOATBITS _TYPEBITS (float)
#define MINSHORT SHORT_MIN
#define MINSHORT SHRT_MIN
#define MININT INT_MIN
#define MINLONG LONG_MIN
#define MAXSHORT SHORT_MAX
#define MAXSHORT SHRT_MAX
#define MAXINT INT_MAX
#define MAXLONG LONG_MAX