diff options
author | Eric Blake <ebb9@byu.net> | 2008-06-09 06:25:35 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2008-06-09 06:25:35 -0600 |
commit | 7bedbd5be1009092bc211f50b3f4108b99f9334c (patch) | |
tree | f114a8fb51bd90d0ead64df0bc417eccf69ec3a5 /lib | |
parent | 7758a34286265603496c94edfb1e491d13ca6e5d (diff) | |
download | autoconf-7bedbd5be1009092bc211f50b3f4108b99f9334c.tar.gz |
Mark AC_TYPE_SIGNAL as obsolete.
* lib/autoconf/types.m4 (AC_TYPE_SIGNAL): Switch to AU_DEFUN.
* doc/autoconf.texi (Function Portability): Update documentation.
(Particular Types): Move AC_TYPE_SIGNAL...
(Obsolete Macros): ...here, and mention why.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/autoconf/types.m4 | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4 index 866bdca5..50a489c4 100644 --- a/lib/autoconf/types.m4 +++ b/lib/autoconf/types.m4 @@ -1,8 +1,8 @@ # This file is part of Autoconf. -*- Autoconf -*- # Type related macros: existence, sizeof, and structure members. # -# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software -# Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free +# Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -693,8 +693,10 @@ AC_DEFUN([_AC_TYPE_UNSIGNED_INT], # AC_TYPE_SIGNAL # -------------- # Note that identifiers starting with SIG are reserved by ANSI C. -AN_FUNCTION([signal], [AC_TYPE_SIGNAL]) -AC_DEFUN([AC_TYPE_SIGNAL], +# C89 requires signal handlers to return void; only K&R returned int; +# modern code does not need to worry about using this macro (not to +# mention that sigaction is better than signal). +AU_DEFUN([AC_TYPE_SIGNAL], [AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([#include <sys/types.h> @@ -706,7 +708,8 @@ AC_DEFUN([AC_TYPE_SIGNAL], AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal, [Define as the return type of signal handlers (`int' or `void').]) -]) +], [your code may safely assume C89 semantics that RETSIGTYPE is void. +Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.]) ## ------------------------ ## |