diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-10-21 10:21:33 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-10-21 10:21:33 +0000 |
commit | 4eca37ecd81a80606e9c2afed5401f15d15e3671 (patch) | |
tree | edb21b983f86981f8ed77704231cbe589bc19bdd /contrib/tools/m4/lib/c-stack.c | |
parent | 7f4d37b99e25e931918580a353dba7eed11407ee (diff) | |
parent | d3ed30f2deefe6a5ed0d07a3018c723749ca5d7b (diff) | |
download | ydb-4eca37ecd81a80606e9c2afed5401f15d15e3671.tar.gz |
Merge branch 'rightlib' into mergelibs-241021-1020
Diffstat (limited to 'contrib/tools/m4/lib/c-stack.c')
-rw-r--r-- | contrib/tools/m4/lib/c-stack.c | 7 |
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)); |