bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

c-stack on mingw


From: Bruno Haible
Subject: c-stack on mingw
Date: Sun, 20 Apr 2008 15:55:13 +0200
User-agent: KMail/1.5.4

On mingw, I see this warning:

c-stack.c:122: warning: implicit declaration of function `kill'

This should fix it. 'kill (getpid (), SIG)' is really only the ancient idiom
for 'raise (SIG)'. The latter is ISO C compliant, the former is only POSIX
compliant.

Objections?


2008-04-20  Bruno Haible  <address@hidden>

        * lib/c-stack.c (die): Use raise.
        * modules/c-stack (Depends-on): Add raise.

--- lib/c-stack.c.orig  2008-04-20 15:51:05.000000000 +0200
+++ lib/c-stack.c       2008-04-20 15:43:45.000000000 +0200
@@ -119,7 +119,7 @@
   write (STDERR_FILENO, "\n", 1);
   if (! signo)
     _exit (exit_failure);
-  kill (getpid (), signo);
+  raise (signo);
   abort ();
 }
 
--- modules/c-stack.orig        2008-04-20 15:51:05.000000000 +0200
+++ modules/c-stack     2008-04-20 15:43:26.000000000 +0200
@@ -10,6 +10,7 @@
 gettext-h
 exitfail
 unistd
+raise
 
 configure.ac:
 gl_C_STACK





reply via email to

[Prev in Thread] Current Thread [Next in Thread]