1999-03-27  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* malloc/obstack.h (obstack_free): Explicitly convert __obj to
	char * to avoid C++ warning.
	Patch by yasushi@cs.washington.edu [PR libc/1035].

1999-03-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* manual/filesys.texi (Temporary Files): mktemp and mkstemp are
	declared in stdlib.h, correct return value of mkstemp.
	Reported by Andries Brouwer <Andries.Brouwer@cwi.nl>.

	* sysdeps/unix/sysv/linux/net/if_arp.h (ARPHDRD_FC*): New defines
	from Linux 2.2.5.

	* misc/regexp.h (compile): Cast some pointers to (char *) to avoid 
	C++ warning.
This commit is contained in:
Andreas Schwab 1999-03-29 02:31:34 +00:00
parent bce4e80067
commit b47516084b
5 changed files with 34 additions and 12 deletions

View File

@ -1,5 +1,23 @@
1999-03-27 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* malloc/obstack.h (obstack_free): Explicitly convert __obj to
char * to avoid C++ warning.
Patch by yasushi@cs.washington.edu [PR libc/1035].
1999-03-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* manual/filesys.texi (Temporary Files): mktemp and mkstemp are
declared in stdlib.h, correct return value of mkstemp.
Reported by Andries Brouwer <Andries.Brouwer@cwi.nl>.
* sysdeps/unix/sysv/linux/net/if_arp.h (ARPHDRD_FC*): New defines
from Linux 2.2.5.
1999-03-28 Andreas Jaeger <aj@arthur.rhein-neckar.de> 1999-03-28 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* misc/regexp.h (compile): Cast some pointers to (char *) to avoid
C++ warning.
* ctype/ctype.h (tolower, toupper): Add __THROW declaration to * ctype/ctype.h (tolower, toupper): Add __THROW declaration to
inline functions. Closes PR libc/1049. inline functions. Closes PR libc/1049.

View File

@ -1,5 +1,5 @@
/* obstack.h - object stack macros /* obstack.h - object stack macros
Copyright (C) 1988,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. Copyright (C) 1988,89,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib. the C library, however. The master source lives in /gd/gnu/lib.
@ -481,7 +481,7 @@ __extension__ \
({ struct obstack *__o = (OBSTACK); \ ({ struct obstack *__o = (OBSTACK); \
void *__obj = (OBJ); \ void *__obj = (OBJ); \
if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \ if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
__o->next_free = __o->object_base = __obj; \ __o->next_free = __o->object_base = (char *)__obj; \
else (obstack_free) (__o, __obj); }) else (obstack_free) (__o, __obj); })
#else /* not __GNUC__ or not __STDC__ */ #else /* not __GNUC__ or not __STDC__ */

View File

@ -2852,7 +2852,7 @@ String constants are normally in read-only storage, so your program
would crash when @code{mktemp} or @code{mkstemp} tried to modify the would crash when @code{mktemp} or @code{mkstemp} tried to modify the
string. string.
@comment unistd.h @comment stdlib.h
@comment Unix @comment Unix
@deftypefun {char *} mktemp (char *@var{template}) @deftypefun {char *} mktemp (char *@var{template})
The @code{mktemp} function generates a unique file name by modifying The @code{mktemp} function generates a unique file name by modifying
@ -2870,7 +2870,7 @@ the file in any case should use the @code{O_EXCL} flag. Using
@code{mkstemp} is a safe way to avoid this problem. @code{mkstemp} is a safe way to avoid this problem.
@end deftypefun @end deftypefun
@comment unistd.h @comment stdlib.h
@comment BSD @comment BSD
@deftypefun int mkstemp (char *@var{template}) @deftypefun int mkstemp (char *@var{template})
The @code{mkstemp} function generates a unique file name just as The @code{mkstemp} function generates a unique file name just as
@ -2878,9 +2878,9 @@ The @code{mkstemp} function generates a unique file name just as
(@pxref{Opening and Closing Files}). If successful, it modifies (@pxref{Opening and Closing Files}). If successful, it modifies
@var{template} in place and returns a file descriptor open on that file @var{template} in place and returns a file descriptor open on that file
for reading and writing. If @code{mkstemp} cannot create a for reading and writing. If @code{mkstemp} cannot create a
uniquely-named file, it makes @var{template} an empty string and returns uniquely-named file, it returns @code{-1}. If @var{template} does not
@code{-1}. If @var{template} does not end with @samp{XXXXXX}, end with @samp{XXXXXX}, @code{mkstemp} returns @code{-1} and does not
@code{mkstemp} returns @code{-1} and does not modify @var{template}. modify @var{template}.
The file is opened using mode @code{0600}. If the file is meant to be The file is opened using mode @code{0600}. If the file is meant to be
used by other users the mode must explicitly changed. used by other users the mode must explicitly changed.

View File

@ -142,21 +142,21 @@ compile (char *__restrict instring, char *__restrict expbuf,
if (__current_size + 1 >= __input_size) if (__current_size + 1 >= __input_size)
{ {
size_t __new_size = __input_size ? 2 * __input_size : 128; size_t __new_size = __input_size ? 2 * __input_size : 128;
char *__new_room = alloca (__new_size); char *__new_room = (char *) alloca (__new_size);
/* See whether we can use the old buffer. */ /* See whether we can use the old buffer. */
if (__new_room + __new_size == __input_buffer) if (__new_room + __new_size == __input_buffer)
{ {
__input_size += __new_size; __input_size += __new_size;
__input_buffer = memcpy (__new_room, __input_buffer, __input_buffer = (char *) memcpy (__new_room, __input_buffer,
__current_size); __current_size);
} }
else if (__input_buffer + __input_size == __new_room) else if (__input_buffer + __input_size == __new_room)
__input_size += __new_size; __input_size += __new_size;
else else
{ {
__input_size = __new_size; __input_size = __new_size;
__input_buffer = memcpy (__new_room, __input_buffer, __input_buffer = (char *) memcpy (__new_room, __input_buffer,
__current_size); __current_size);
} }
} }
__input_buffer[__current_size++] = __ch; __input_buffer[__current_size++] = __ch;

View File

@ -109,6 +109,10 @@ struct arphdr
#define ARPHRD_ASH 781 /* (Nexus Electronics) Ash. */ #define ARPHRD_ASH 781 /* (Nexus Electronics) Ash. */
#define ARPHRD_ECONET 782 /* Acorn Econet. */ #define ARPHRD_ECONET 782 /* Acorn Econet. */
#define ARPHRD_IRDA 783 /* Linux/IR. */ #define ARPHRD_IRDA 783 /* Linux/IR. */
#define ARPHRD_FCPP 784 /* Point to point fibrechanel. */
#define ARPHRD_FCAL 785 /* Fibrechanel arbitrated loop. */
#define ARPHRD_FCPL 786 /* Fibrechanel public loop. */
#define ARPHRD_FCPFABRIC 787 /* Fibrechanel fabric. */
/* ARP ioctl request. */ /* ARP ioctl request. */