aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/m4/lib/c-stack.c
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-10-20 14:48:12 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-10-20 15:00:29 +0300
commitb6f802fe434163ffe6f81843780906ae25ac4755 (patch)
treee63ee2665b40183135d1e04756f2fe091f031209 /contrib/tools/m4/lib/c-stack.c
parent694f58a5c020bfe1028af0fd2d4947d07e2a7080 (diff)
downloadydb-b6f802fe434163ffe6f81843780906ae25ac4755.tar.gz
Update contrib/tools/m4 to 1.4.18
commit_hash:dab43d0051ce5656201a6f031d378c04dceefa2c
Diffstat (limited to 'contrib/tools/m4/lib/c-stack.c')
-rw-r--r--contrib/tools/m4/lib/c-stack.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/tools/m4/lib/c-stack.c b/contrib/tools/m4/lib/c-stack.c
index ac0aacba66..aab7d799f9 100644
--- a/contrib/tools/m4/lib/c-stack.c
+++ b/contrib/tools/m4/lib/c-stack.c
@@ -1,6 +1,6 @@
/* Stack overflow handling.
- Copyright (C) 2002, 2004, 2006, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, 2008-2016 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
@@ -78,6 +78,7 @@ typedef struct sigaltstack stack_t;
#include "c-stack.h"
#include "exitfail.h"
#include "ignore-value.h"
+#include "getprogname.h"
#if defined SA_ONSTACK && defined SA_SIGINFO
# define SIGINFO_WORKS 1
@@ -88,8 +89,6 @@ typedef struct sigaltstack stack_t;
# endif
#endif
-extern char *program_name;
-
/* The user-specified action to take when a SEGV-related program error
or stack overflow occurs. */
static void (* volatile segv_action) (int);
@@ -116,7 +115,7 @@ die (int signo)
#endif /* !SIGINFO_WORKS && !HAVE_LIBSIGSEGV */
segv_action (signo);
message = signo ? program_error_message : stack_overflow_message;
- ignore_value (write (STDERR_FILENO, program_name, strlen (program_name)));
+ ignore_value (write (STDERR_FILENO, getprogname (), strlen (getprogname ())));
ignore_value (write (STDERR_FILENO, ": ", 2));
ignore_value (write (STDERR_FILENO, message, strlen (message)));
ignore_value (write (STDERR_FILENO, "\n", 1));