Dash:
[t2.git] / package / editors / xemacs / strsignal.patch
blobb09cae466ffb0b139d656b2917100f4a4689a253
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../xemacs/strsignal.patch
5 # Copyright (C) 2020 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 diff -r 3ca291c0f7e3 configure
18 --- a/configure Sun Jul 28 10:17:08 2019 +0100
19 +++ b/configure Thu Aug 27 00:15:50 2020 +0200
20 @@ -18090,7 +18090,7 @@
21 esac
24 -for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp fsync ftime ftruncate getaddrinfo gethostname getnameinfo getpagesize getrlimit gettimeofday getcwd link logb lrand48 matherr mkdir mktime perror poll random readlink rename res_init rint rmdir select setitimer setpgid setsid sigblock sighold sigprocmask snprintf strerror strlwr strupr symlink tzset ulimit umask usleep vlimit vsnprintf waitpid wcscmp wcslen
25 +for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp fsync ftime ftruncate getaddrinfo gethostname getnameinfo getpagesize getrlimit gettimeofday getcwd link logb lrand48 matherr mkdir mktime perror poll random readlink rename res_init rint rmdir select setitimer setpgid setsid sigblock sighold sigprocmask snprintf strerror strlwr strsignal strupr symlink tzset ulimit umask usleep vlimit vsnprintf waitpid wcscmp wcslen
26 do :
27 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
28 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
29 diff -r 3ca291c0f7e3 configure.ac
30 --- a/configure.ac Sun Jul 28 10:17:08 2019 +0100
31 +++ b/configure.ac Thu Aug 27 00:15:50 2020 +0200
32 @@ -4563,7 +4563,7 @@
33 dnl Check for POSIX functions.
34 dnl ----------------------------------------------------------------
36 -AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp fsync ftime ftruncate getaddrinfo gethostname getnameinfo getpagesize getrlimit gettimeofday getcwd link logb lrand48 matherr mkdir mktime perror poll random readlink rename res_init rint rmdir select setitimer setpgid setsid sigblock sighold sigprocmask snprintf strerror strlwr strupr symlink tzset ulimit umask usleep vlimit vsnprintf waitpid wcscmp wcslen)
37 +AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp fsync ftime ftruncate getaddrinfo gethostname getnameinfo getpagesize getrlimit gettimeofday getcwd link logb lrand48 matherr mkdir mktime perror poll random readlink rename res_init rint rmdir select setitimer setpgid setsid sigblock sighold sigprocmask snprintf strerror strlwr strsignal strupr symlink tzset ulimit umask usleep vlimit vsnprintf waitpid wcscmp wcslen)
39 dnl getaddrinfo() is borked under hpux11
40 if test "$ac_cv_func_getaddrinfo" != "no" ; then
41 diff -r 3ca291c0f7e3 src/config.h.in
42 --- a/src/config.h.in Sun Jul 28 10:17:08 2019 +0100
43 +++ b/src/config.h.in Thu Aug 27 00:15:50 2020 +0200
44 @@ -417,6 +417,7 @@
45 #undef HAVE_SNPRINTF
46 #undef HAVE_STRERROR
47 #undef HAVE_STRLWR
48 +#undef HAVE_STRSIGNAL
49 #undef HAVE_STRUPR
50 #undef HAVE_SYMLINK
51 #undef HAVE_TZSET
52 diff -r 3ca291c0f7e3 src/process.c
53 --- a/src/process.c Sun Jul 28 10:17:08 2019 +0100
54 +++ b/src/process.c Thu Aug 27 00:15:50 2020 +0200
55 @@ -1646,7 +1646,11 @@
56 signal_name (int signum)
58 if (signum >= 0 && signum < NSIG)
59 +#ifdef HAVE_STRSIGNAL
60 + return strsignal (signum);
61 +#else
62 return (const char *) sys_siglist[signum];
63 +#endif
65 return (const char *) GETTEXT ("unknown signal");
67 diff -r 3ca291c0f7e3 src/s/linux.h
68 --- a/src/s/linux.h Sun Jul 28 10:17:08 2019 +0100
69 +++ b/src/s/linux.h Thu Aug 27 00:15:50 2020 +0200
70 @@ -36,10 +36,6 @@
72 /* Deleted GNU_LIBRARY_PENDING_OUTPUT_COUNT -- unused in XEmacs */
74 -/* This is needed for sysdep.c */
76 -#define HAVE_SYS_SIGLIST
78 /* #define POSIX -- not used in XEmacs */
80 /* Deleted TERM stuff -- probably hugely obsolete */
81 diff -r 3ca291c0f7e3 src/sysdep.c
82 --- a/src/sysdep.c Sun Jul 28 10:17:08 2019 +0100
83 +++ b/src/sysdep.c Thu Aug 27 00:15:50 2020 +0200
84 @@ -3520,7 +3520,7 @@
85 /* Strings corresponding to defined signals */
86 /************************************************************************/
88 -#if (!defined(HAVE_DECL_SYS_SIGLIST) || !HAVE_DECL_SYS_SIGLIST ) && !defined (HAVE_SYS_SIGLIST)
89 +#if !defined(HAVE_STRSIGNAL) && (!defined(HAVE_DECL_SYS_SIGLIST) || !HAVE_DECL_SYS_SIGLIST )
91 #if defined(WIN32_NATIVE) || defined(CYGWIN)
92 const char *sys_siglist[] =
93 diff -r 3ca291c0f7e3 src/syssignal.h
94 --- a/src/syssignal.h Sun Jul 28 10:17:08 2019 +0100
95 +++ b/src/syssignal.h Thu Aug 27 00:15:50 2020 +0200
96 @@ -263,10 +263,8 @@
97 # endif
98 #endif
100 -/* HAVE_DECL_SYS_SIGLIST is determined by configure. On Linux, it seems,
101 - configure incorrectly fails to find it, so s/linux.h defines
102 - HAVE_SYS_SIGLIST. */
103 -#if (!defined(HAVE_DECL_SYS_SIGLIST) || !HAVE_DECL_SYS_SIGLIST ) && !defined (HAVE_SYS_SIGLIST)
104 +/* Systems that have sys_siglist but do not declare it. */
105 +#if !defined(HAVE_STRSIGNAL) && (!defined(HAVE_DECL_SYS_SIGLIST) || !HAVE_DECL_SYS_SIGLIST )
106 extern const char *sys_siglist[];
107 #endif