forked from pool/slang
* pre2.3.4-16: Removed unnecessary chack for a NULL string in keymap.c:find_the_key, and corrected a potential memory leak in the sltoken.c:compile_byte_compiled_multistring function * pre2.3.4-15: Added UTF-16 surrogate handling to the expand_escaped_string function and json module * pre2.3.4-14: Added fcntl_getpipe_sz and fcntl_setpipe_sz functions to the fcntl module to get and set the buffer size for pipes * pre2.3.4-13: Initialize the variables provided by the %g operator to zero to not leak uninitialized data from the stack if not set by %P. (Miroslav Lichvar) * pre2.3.4-12: modules/chksum_sha2.c: Use memcpy to avoid type-punning warning * pre2.3.4-11: lib/timestamp.sl: Fixed a bug involving leap years * pre2.3.4-10: Updated the Unicode tables to v15 from v10 * pre2.3.4-9: src/slang.ver: Removed the undefined symbol SLang_Rline_Quit, which was causing a link error on Gentoo Linux (Michal Rostecki) * pre2.3.4-8: check for NULL return value from the ctime function * pre2.3.4-7: mkfiles/makefile.m32: Added install1 target to work with versions of mingw make that cannot process the install target. Previously this required editing the makefile (windows-specific) - download from git://git.jedsoft.org/git/slang.git * drop slang-2.3.3.tar.bz2.asc and slang.keyring - rename patches * slang.patch to 0001-Use-termcap.patch * slang-autoconf.patch to 0002-Fix-CFLAGS-and-generate-sl-config.h.patch * slang-fsuid.patch to 0003-Enforce-use-of-setfsuid.patch OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/slang?expand=0&rev=57
117 lines
2.9 KiB
Diff
117 lines
2.9 KiB
Diff
From 0842f94931603fe0e95ae79bb4706b0291cb3f61 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@gmail.com>
|
|
Date: Tue, 7 Jan 2025 17:43:32 +0100
|
|
Subject: [PATCH 2/3] Fix CFLAGS and generate sl-config.h
|
|
|
|
---
|
|
autoconf/aclocal.m4 | 9 ++++---
|
|
autoconf/configure.ac | 58 ++++++++++++++++++++++++++++++++++++++++++-
|
|
2 files changed, 63 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/autoconf/aclocal.m4 b/autoconf/aclocal.m4
|
|
index b2dfcd3..90636af 100644
|
|
--- a/autoconf/aclocal.m4
|
|
+++ b/autoconf/aclocal.m4
|
|
@@ -362,8 +362,11 @@ then
|
|
if test -n "$gcc_warnings"
|
|
then
|
|
CFLAGS="$CFLAGS -Wall -W -pedantic -Winline -Wmissing-prototypes \
|
|
- -Wnested-externs -Wpointer-arith -Wcast-align -Wshadow -Wstrict-prototypes \
|
|
- -Wformat=2"
|
|
+ -Wnested-externs -Wpointer-arith -Wcast-align -Wshadow -Wstrict-prototypes \
|
|
+ -Wformat -Wformat-security"
|
|
+ ELF_CFLAGS="$ELF_CFLAGS -Wall -W -pedantic -Winline -Wmissing-prototypes \
|
|
+ -Wnested-externs -Wpointer-arith -Wcast-align -Wshadow -Wstrict-prototypes \
|
|
+ -Wformat -Wformat-security"
|
|
# Now trim excess whitespace
|
|
CFLAGS=`echo $CFLAGS`
|
|
fi
|
|
@@ -578,7 +581,7 @@ dnl # Check for dynamic linker
|
|
dnl #-------------------------------------------------------------------------
|
|
DYNAMIC_LINK_LIB=""
|
|
|
|
-dnl# AH_TEMPLATE([HAVE_DLOPEN],1,[Define if you have dlopen])
|
|
+AH_TEMPLATE([HAVE_DLOPEN],1,[Define if you have dlopen])
|
|
|
|
AC_CHECK_HEADER(dlfcn.h,[
|
|
AC_DEFINE(HAVE_DLFCN_H,1,[Define if you have the dlfcn.h header])
|
|
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
|
|
index aeaaca8..4f8d184 100644
|
|
--- a/autoconf/configure.ac
|
|
+++ b/autoconf/configure.ac
|
|
@@ -17,6 +17,62 @@ dnl# fi
|
|
AC_CONFIG_AUX_DIR(autoconf)
|
|
AC_CANONICAL_HOST
|
|
|
|
+AH_TOP([
|
|
+/* -*- c -*- */
|
|
+/* Note: this is for unix only. */
|
|
+
|
|
+#ifndef SL_CONFIG_H
|
|
+#define SL_CONFIG_H
|
|
+])
|
|
+
|
|
+AH_BOTTOM([
|
|
+#if defined(HAVE_SIGADDSET) && defined(HAVE_SIGEMPTYSET)
|
|
+# if defined(HAVE_SIGACTION) && defined(HAVE_SIGPROCMASK)
|
|
+# define SLANG_POSIX_SIGNALS
|
|
+# endif
|
|
+#endif
|
|
+
|
|
+/* Define if you need to in order for stat and other things to work. */
|
|
+#undef _POSIX_SOURCE
|
|
+
|
|
+#ifdef _AIX
|
|
+# ifndef _POSIX_SOURCE
|
|
+# define _POSIX_SOURCE 1
|
|
+# endif
|
|
+# ifndef _ALL_SOURCE
|
|
+# define _ALL_SOURCE
|
|
+# endif
|
|
+/* This may generate warnings but the fact is that without it, xlc will
|
|
+ * INCORRECTLY inline many str* functions. */
|
|
+# undef __STR__
|
|
+#endif
|
|
+
|
|
+/* define USE_TERMCAP if you want to use it instead of terminfo. */
|
|
+#if defined(sequent) || defined(NeXT)
|
|
+# ifndef USE_TERMCAP
|
|
+# define USE_TERMCAP
|
|
+# endif
|
|
+#endif
|
|
+
|
|
+#if defined(ultrix) && !defined(__GNUC__)
|
|
+# ifndef NO_PROTOTYPES
|
|
+# define NO_PROTOTYPES
|
|
+# endif
|
|
+#endif
|
|
+
|
|
+#ifndef unix
|
|
+# define unix 1
|
|
+#endif
|
|
+
|
|
+#ifndef __unix__
|
|
+# define __unix__ 1
|
|
+#endif
|
|
+
|
|
+#define _SLANG_SOURCE_ 1
|
|
+#endif /* SL_CONFIG_H */
|
|
+])
|
|
+
|
|
+
|
|
JD_INIT
|
|
JD_ANSI_CC
|
|
|
|
@@ -308,7 +364,7 @@ else
|
|
fi
|
|
AC_SUBST(ZLIB_MODULE)
|
|
|
|
-m4_include([./iconv.m4])
|
|
+dnl m4_include([./iconv.m4])
|
|
|
|
ICONV_MODULE=""
|
|
JD_CHECK_FOR_LIBRARY(iconv)
|
|
--
|
|
2.47.1
|
|
|