Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update.
2004-11-15  Jakub Jelinek  <jakub@redhat.com>

	* posix/bug-regex24.c: Include string.h.

	* nis/nis_clone_obj.c (nis_clone_object): Rename out3 label to out2
	and out2 to out.  Remove out label.  Formatting.

2004-11-15  Ulrich Drepper  <drepper@redhat.com>

	* include/stdio.h: Do not mark __libc_message as noreturn.
	* sysdeps/unix/sysv/linux/libc_fatal.c (__libc_fatal): Add loop to
	fool gcc.  Include <stdbool.h>.
	* sysdeps/posix/libc_fatal.c (__libc_fatal): Add loop to fool gcc.
	(__libc_message): Fix typo.
  • Loading branch information
Ulrich Drepper committed Nov 15, 2004
1 parent 4f27c49 commit f895670
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 17 deletions.
15 changes: 15 additions & 0 deletions ChangeLog
@@ -1,3 +1,18 @@
2004-11-15 Jakub Jelinek <jakub@redhat.com>

* posix/bug-regex24.c: Include string.h.

* nis/nis_clone_obj.c (nis_clone_object): Rename out3 label to out2
and out2 to out. Remove out label. Formatting.

2004-11-15 Ulrich Drepper <drepper@redhat.com>

* include/stdio.h: Do not mark __libc_message as noreturn.
* sysdeps/unix/sysv/linux/libc_fatal.c (__libc_fatal): Add loop to
fool gcc. Include <stdbool.h>.
* sysdeps/posix/libc_fatal.c (__libc_fatal): Add loop to fool gcc.
(__libc_message): Fix typo.

2004-11-13 Ulrich Drepper <drepper@redhat.com>

* malloc/malloc.c (malloc_state): stat_lock_* elements need only
Expand Down
3 changes: 1 addition & 2 deletions include/stdio.h
Expand Up @@ -62,8 +62,7 @@ extern int __gen_tempname (char *__tmpl, int __kind);
/* Print out MESSAGE on the error output and abort. */
extern void __libc_fatal (__const char *__message)
__attribute__ ((__noreturn__));
extern void __libc_message (int do_abort, __const char *__fnt, ...)
__attribute__ ((__noreturn__));
extern void __libc_message (int do_abort, __const char *__fnt, ...);

/* Acquire ownership of STREAM. */
extern void __flockfile (FILE *__stream);
Expand Down
11 changes: 5 additions & 6 deletions nis/nis_clone_obj.c
Expand Up @@ -41,27 +41,26 @@ nis_clone_object (const nis_object *src, nis_object *dest)
if (dest == NULL)
{
if ((res = calloc (1, sizeof (nis_object))) == NULL)
goto out2;
goto out;
}
else
res = dest;

xdrmem_create (&xdrs, addr, size, XDR_ENCODE);
if (!_xdr_nis_object (&xdrs, (nis_object *)src))
goto out3;
if (!_xdr_nis_object (&xdrs, (nis_object *) src))
goto out2;
xdr_destroy (&xdrs);
xdrmem_create (&xdrs, addr, size, XDR_DECODE);
if (!_xdr_nis_object (&xdrs, res))
{
out3:
out2:
if (dest == NULL)
free (res);
res = NULL;
}

out:
xdr_destroy (&xdrs);
out2:
out:
free (addr);

return res;
Expand Down
1 change: 1 addition & 0 deletions posix/bug-regex24.c
@@ -1,5 +1,6 @@
#include <regex.h>
#include <stdio.h>
#include <string.h>

#define str "civic"

Expand Down
10 changes: 6 additions & 4 deletions sysdeps/posix/libc_fatal.c
Expand Up @@ -131,16 +131,18 @@ __libc_message (int do_abort, const char *fmt, ...)

va_end (ap_copy);

if (do_abort()
/* Kill the application. */
abort ();
if (do_abort)
/* Kill the application. */
abort ();
}


void
__libc_fatal (message)
const char *message;
{
__libc_message (1, "%s", message);
/* The loop is added only to keep gcc happy. */
while (1)
__libc_message (1, "%s", message);
}
libc_hidden_def (__libc_fatal)
9 changes: 4 additions & 5 deletions sysdeps/unix/sysv/linux/libc_fatal.c
Expand Up @@ -20,16 +20,13 @@
#include <fcntl.h>
#include <paths.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sysdep.h>
#include <unistd.h>
#include <sys/syslog.h>
#ifndef ABORT_INSTRUCTION
/* No such instruction is available. */
# define ABORT_INSTRUCTION
#endif

/* Abort with an error message. */
#include <not-cancel.h>
Expand Down Expand Up @@ -153,6 +150,8 @@ void
__libc_fatal (message)
const char *message;
{
__libc_message (1, "%s", message);
/* The loop is added only to keep gcc happy. */
while (1)
__libc_message (1, "%s", message);
}
libc_hidden_def (__libc_fatal)

0 comments on commit f895670

Please sign in to comment.