summaryrefslogtreecommitdiff
path: root/lib/raise.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:23 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:23 +0900
commitc0c4ebc8462f91e7cf41e7404f71dca434b8494e (patch)
tree764f42c7258a7f83c64a1e75669b5694072cee20 /lib/raise.c
parentdfd19f19c019e044f97e46081a6960614c0cf3f9 (diff)
downloadwget-c0c4ebc8462f91e7cf41e7404f71dca434b8494e.tar.gz
wget-c0c4ebc8462f91e7cf41e7404f71dca434b8494e.tar.bz2
wget-c0c4ebc8462f91e7cf41e7404f71dca434b8494e.zip
Imported Upstream version 1.20upstream/1.20
Diffstat (limited to 'lib/raise.c')
-rw-r--r--lib/raise.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/lib/raise.c b/lib/raise.c
index 3a29339..8a93bea 100644
--- a/lib/raise.c
+++ b/lib/raise.c
@@ -31,27 +31,9 @@
# include "msvc-inval.h"
# endif
-# undef raise
-
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static int
-raise_nothrow (int sig)
-{
- int result;
-
- TRY_MSVC_INVAL
- {
- result = raise (sig);
- }
- CATCH_MSVC_INVAL
- {
- result = -1;
- errno = EINVAL;
- }
- DONE_MSVC_INVAL;
-
- return result;
-}
+/* Forward declaration. */
+static int raise_nothrow (int sig);
# else
# define raise_nothrow raise
# endif
@@ -61,12 +43,11 @@ raise_nothrow (int sig)
# include <unistd.h>
-# define rpl_raise raise
-
#endif
int
-rpl_raise (int sig)
+raise (int sig)
+#undef raise
{
#if GNULIB_defined_signal_blocking && GNULIB_defined_SIGPIPE
if (sig == SIGPIPE)
@@ -79,3 +60,24 @@ rpl_raise (int sig)
return kill (getpid (), sig);
#endif
}
+
+#if HAVE_RAISE && HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+raise_nothrow (int sig)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = raise (sig);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ errno = EINVAL;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+#endif