+Mon Dec 9 03:39:30 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * config.make.in (defines): Add @USE_NEW_MALLOC@.
+ * Makefile.in: Define USE_NEW_MALLOC to -DUSE_NEW_MALLOC if
+ we use the new malloc.
+
+ * malloc.h: Use either <malloc/malloc.h> or <new-malloc/malloc.h>
+ depending on USE_NEW_MALLOC.
+
+ Fix some more POSIX.1 problems.
+ * libio/fileops.c (_IO_file_underflow): Set errno to EBADF if used
+ on a write-only stream.
+ (_IO_file_overflow): Set errno to EBADF if used on a read-only
+ stream.
+ (_IO_file_seekoff): POSIX.1 requires that fseek() after an fflush()
+ call really positions the file offset to the correct position
+ and no read-ahead happens.
+
+ * locale/C-monetary.c: Set mon_grouping file to "" and "\377"
+ to pass POSIX test suite.
+ * stdio-common/vfprintf.c: Handle empty string as grouping command
+ correctly.
+ * stdlib/grouping.h: Likewise.
+
+ * misc/syslog.c: Case first argument of __libc_cleanup_region_start.
+
+ * signal/sigsetops.h: Update copyright. Don't include ansidecl.h.
+
+ * stdio-common/printf_fp.c: Update copyright.
+
+Sun Dec 8 16:39:28 1996 Andreas Jaeger <aj@arthur.pfalz.de>
+
+ * time/Makefile: Compile ap.c with NO_MCHECK flag if new-malloc
+ used (not otherwise).
+
Sun Dec 8 06:56:49 1996 Ulrich Drepper <drepper@cygnus.com>
* io/getwd.c: Use PATH_MAX not LOCAL_PATH_MAX. Fix typo in
(__tzset): Don't increment pointer tz when no DST information is
given.
+ * misc/syslog.c (vsyslog): Cast argument to __libc_cleanup_region
+ to get Hurd macros right.
+
Sat Dec 7 23:47:54 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/mach/libc-lock.h [_LIBC]: Add definition of
config-os = @host_os@
config-sysdirs = @sysnames@
-defines = @DEFINES@
+defines = @DEFINES@ @USE_NEW_MALLOC@
elf = @elf@
have-initfini = @libc_cv_have_initfini@
echo $ac_n "checking malloc selection""... $ac_c" 1>&6
echo "configure:1844: checking malloc selection" >&5
-test $malloc = default && malloc=malloc
+case $malloc in
+new-malloc) USE_NEW_MALLOC=-DUSE_NEW_MALLOC ;;
+default) malloc=malloc ;;
+esac
+
echo "$ac_t""$malloc" 1>&6
s%@uname_version@%$uname_version%g
s%@stdio@%$stdio%g
s%@malloc@%$malloc%g
+s%@USE_NEW_MALLOC@%$USE_NEW_MALLOC%g
s%@libc_cv_slibdir@%$libc_cv_slibdir%g
s%@libc_cv_sysconfdir@%$libc_cv_sysconfdir%g
s%@gnu_ld@%$gnu_ld%g
AC_MSG_CHECKING(malloc selection)
AC_SUBST(malloc)
-test $malloc = default && malloc=malloc
+case $malloc in
+new-malloc) USE_NEW_MALLOC=-DUSE_NEW_MALLOC ;;
+default) malloc=malloc ;;
+esac
+AC_SUBST(USE_NEW_MALLOC)
AC_MSG_RESULT($malloc)
+++ /dev/null
-#include "libioP.h"
-#if _G_HAVE_ATEXIT
-#include <stdlib.h>
-
-typedef void (*voidfunc) __P((void));
-
-/* Prototype. */
-static void DEFUN_VOID (_IO_register_cleanup);
-
-static void
-DEFUN_VOID(_IO_register_cleanup)
-{
- atexit ((voidfunc)_IO_cleanup);
- _IO_cleanup_registration_needed = 0;
-}
-
-void (*_IO_cleanup_registration_needed) __P((void)) = _IO_register_cleanup;
-#else
-void (*_IO_cleanup_registration_needed) __P((void)) = NULL;
-#endif /* _G_HAVE_ATEXIT */
#endif
if (fp->_flags & _IO_NO_READS)
- return EOF;
+ {
+ __set_errno (EBADF);
+ return EOF;
+ }
if (fp->_IO_read_ptr < fp->_IO_read_end)
return *(unsigned char*)fp->_IO_read_ptr;
register _IO_FILE* f AND int ch)
{
if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
- return EOF;
+ {
+ __set_errno (EBADF);
+ return EOF;
+ }
/* If currently reading or no buffer allocated. */
if ((f->_flags & _IO_CURRENTLY_PUTTING) == 0)
{
_IO_pos_t result;
_IO_off_t delta, new_offset;
long count;
+ /* POSIX.1 8.2.3.7 says that after a call the fflush() the file
+ offset of the underlying file must be exact. */
+ int must_be_exact = (fp->_IO_read_base == fp->_IO_read_end
+ && fp->_IO_write_base == fp->_IO_write_ptr);
if (mode == 0)
dir = _IO_seek_cur, offset = 0; /* Don't move any pointers. */
else
{
count = _IO_SYSREAD (fp, fp->_IO_buf_base,
- fp->_IO_buf_end - fp->_IO_buf_base);
+ (must_be_exact
+ ? delta : fp->_IO_buf_end - fp->_IO_buf_base));
if (count < delta)
{
/* We weren't allowed to read, but try to seek the remainder. */
+++ /dev/null
-/*
-Copyright (C) 1993 Free Software Foundation
-
-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 GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, 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. */
-
-/* I/O OS-level primitives.
- Needs to be replaced if not using Unix.
- Also needs to be replaced if avoiding name-space pollution
- (in which case read would be defined in terms of _IO_read,
- rather than vice versa). */
-
-#include "libioP.h"
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef TODO
-/* Add open, isatty */
-#endif
-
-_IO_ssize_t
-DEFUN(_IO_read, (fildes, buf, nbyte),
- int fildes AND void *buf AND _IO_size_t nbyte)
-{
- return __read (fildes, buf, nbyte);
-}
-
-_IO_ssize_t
-DEFUN(_IO_write, (fildes, buf, nbyte),
- int fildes AND const void *buf AND _IO_size_t nbyte)
-{
- return __write (fildes, buf, nbyte);
-}
-
-_IO_off_t
-DEFUN(_IO_lseek, (fildes, offset, whence),
- int fildes AND _IO_off_t offset AND int whence)
-{
- return __lseek (fildes, offset, whence);
-}
-
-int
-DEFUN(_IO_close, (fildes),
- int fildes)
-{
- return __close (fildes);
-}
-
-int
-DEFUN(_IO_fstat, (fildes, buf),
- int fildes AND struct stat *buf)
-{
- return __fstat (fildes, buf);
-}
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-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., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, 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 "localeinfo.h"
{ string: "" },
{ string: "" },
{ string: "" },
- { string: not_available },
+ { string: "" },
{ string: "" },
{ string: "" },
{ string: not_available },
-#include <malloc/malloc.h>
+#ifdef USE_NEW_MALLOC
+# include <new-malloc/malloc.h>
+#else
+# include <malloc/malloc.h>
+#endif
/* Prepare for multiple users. We have to take care: open and
write are cancelation points. */
- __libc_cleanup_region_start (cancel_handler, &oldaction_ptr);
+ __libc_cleanup_region_start ((void (*) (void *)) cancel_handler,
+ &oldaction_ptr);
__libc_lock_lock (syslog_lock);
/* Prepare for a broken connection. */
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* 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 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. */
/* Definitions relevant to functions that operate on `sigset_t's. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
#include <string.h>
/* Floating point output for `printf'.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-Written by Ulrich Drepper.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ 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. */
/* The gmp headers need some configuration frobs. */
#define HAVE_ALLOCA 1
/* We treat all negative values like CHAR_MAX. */
- if (*grouping == CHAR_MAX || *grouping < 0)
+ if (*grouping == CHAR_MAX || *grouping <= 0)
/* No grouping should be done. */
return w;
/* Internal header for proving correct grouping in strings of numbers.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-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 <limits.h>
if (grouping == NULL)
return end;
+ if (*grouping == '\0')
+ {
+ /* No grouping allowed. Accept all characters up to the first
+ thousands separator. */
+ while (begin < end && *begin != thousands)
+ ++begin;
+ return begin;
+ }
+
while (end > begin)
{
const STRING_TYPE *cp = end - 1;
init-first.h
+llseek.c
siglist.h
sysctl.c
termio.h
#include "confdefs.h"
#include <linux/version.h>
int main() {
-#if LINUX_VERSION_CODE < ( *65536+ 0 *256+ 10) /* .0.10 */
+#if LINUX_VERSION_CODE < (2 *65536+ 0 *256+ 10) /* 2.0.10 */
eat flaming death
#endif
; return 0; }
CFLAGS-scheck.c = -Wno-strict-prototypes -DNOID
CFLAGS-tzfile.c = $(tz-cflags)
-ifneq ($(malloc),new-malloc)
+ifeq ($(malloc),new-malloc)
CFLAGS-ap.c = -DNO_MCHECK
endif