You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
349 lines
8.5 KiB
349 lines
8.5 KiB
Index: args.c |
|
--- args.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ args.c 2025-06-01 09:44:55.727240000 +0200 |
|
@@ -29,8 +29,8 @@ |
|
#include <stddef.h> |
|
#include <signal.h> |
|
#include <string.h> |
|
+#include <stdlib.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "signal.h" |
|
#include "unwind.h" |
|
Index: arith.c |
|
--- arith.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ arith.c 2025-06-01 09:44:55.727680000 +0200 |
|
@@ -40,7 +40,6 @@ |
|
#if HAVE_ROUNDING_CTL_H |
|
#include <fenv.h> |
|
#endif |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "signal.h" |
|
#include "unwind.h" |
|
Index: combi.c |
|
--- combi.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ combi.c 2025-06-01 09:44:55.727812000 +0200 |
|
@@ -26,6 +26,7 @@ |
|
* POSSIBILITY OF SUCH DAMAGE. |
|
*/ |
|
|
|
+#include <stdlib.h> |
|
#include <wctype.h> |
|
#include <wchar.h> |
|
#include <signal.h> |
|
Index: configure |
|
--- configure.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ configure 2025-06-01 09:47:22.610388000 +0200 |
|
@@ -1110,28 +1110,7 @@ |
|
|
|
output=$($make conftest.ccver) |
|
set -- $output |
|
-if [ "$1" = "gcc" ] ; then |
|
- shift; |
|
- |
|
- while [ $# -gt 0 ] ; do |
|
- case $1 in |
|
- [0-9].[0-9].[0-9] | [0-9].[0-9].[1-9][0-9] | \ |
|
- [0-9].[1-9][0-9].[0-9] | [0-9].[1-9][0-9].[1-9][0-9] | \ |
|
- [1-9][0-9].[0-9].[0-9] | [1-9][0-9].[0-9].[1-9][0-9] | \ |
|
- [1-9][0-9].[1-9][0-9].[0-9] | [1-9][0-9].[1-9][0-9].[1-9][0-9] ) |
|
- gcc_version=$1 |
|
- save_ifs=$IFS ; IFS=. ; set -- $gcc_version ; IFS=$save_ifs |
|
- printf "(%s)\n" "$*" |
|
- if [ $1 -lt 4 ] || [ $1 -eq 4 -a $2 -le 3 ] ; then |
|
- broken128=y |
|
- fi |
|
- [ $1 -lt 5 ] && do_nopie= |
|
- break |
|
- ;; |
|
- esac |
|
- shift |
|
- done |
|
-elif [ "$1" = "clang" -o "$2" = "clang" ] ; then |
|
+if [ "$1" = "clang" -o "$2" = "clang" ] ; then |
|
printf "(clang)\n" |
|
do_nopie= |
|
else |
|
@@ -1201,6 +1180,7 @@ |
|
#include <sys/wait.h> |
|
#include <time.h> |
|
#include <unistd.h> |
|
+#include <stdlib.h> |
|
#include <wchar.h> |
|
#include <wctype.h> |
|
|
|
@@ -2842,6 +2822,7 @@ |
|
cat > conftest.c <<! |
|
#include "config.h" |
|
#include <process.h> |
|
+#include <stdlib.h> |
|
#include <wchar.h> |
|
|
|
int main(int argc, char **argv) |
|
Index: eval.c |
|
--- eval.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ eval.c 2025-06-01 09:44:55.728908000 +0200 |
|
@@ -35,7 +35,6 @@ |
|
#include <time.h> |
|
#include <assert.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "gc.h" |
|
#include "args.h" |
|
Index: ffi.c |
|
--- ffi.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ ffi.c 2025-06-01 09:44:55.729426000 +0200 |
|
@@ -53,7 +53,6 @@ |
|
#include <unistd.h> |
|
#include <errno.h> |
|
#endif |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "stream.h" |
|
#include "gc.h" |
|
@@ -74,6 +73,8 @@ |
|
#include "ffi.h" |
|
#include "txr.h" |
|
|
|
+#define zalloca(size) memset(alloca(size), 0, size) |
|
+ |
|
#define alignof(type) offsetof(struct {char x; type y;}, y) |
|
|
|
#define pad_retval(size) (convert(size_t, size) > sizeof (ffi_arg) \ |
|
Index: ftw.c |
|
--- ftw.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ ftw.c 2025-06-01 09:44:55.729498000 +0200 |
|
@@ -34,7 +34,6 @@ |
|
#include <errno.h> |
|
#include <ftw.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "gc.h" |
|
#include "args.h" |
|
Index: hash.c |
|
--- hash.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ hash.c 2025-06-01 09:44:55.729731000 +0200 |
|
@@ -35,7 +35,6 @@ |
|
#include <signal.h> |
|
#include <wchar.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#if HAVE_UNISTD_H |
|
#include <unistd.h> |
|
#endif |
|
Index: lib.c |
|
--- lib.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ lib.c 2025-06-01 09:44:55.730770000 +0200 |
|
@@ -40,7 +40,6 @@ |
|
#include <assert.h> |
|
#include <locale.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#if HAVE_GETENVIRONMENTSTRINGS |
|
#define NOMINMAX |
|
#include <windows.h> |
|
Index: match.c |
|
--- match.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ match.c 2025-06-01 09:44:55.731170000 +0200 |
|
@@ -33,7 +33,6 @@ |
|
#include <wchar.h> |
|
#include <signal.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "gc.h" |
|
#include "args.h" |
|
Index: parser.c |
|
--- parser.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ parser.c 2025-06-01 09:44:55.731384000 +0200 |
|
@@ -37,7 +37,6 @@ |
|
#include <wctype.h> |
|
#include <errno.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#ifdef __CYGWIN__ |
|
#include <sys/utsname.h> |
|
#endif |
|
Index: parser.y |
|
--- parser.y.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ parser.y 2025-06-01 09:44:55.731591000 +0200 |
|
@@ -35,8 +35,8 @@ |
|
#include <stdlib.h> |
|
#include <wchar.h> |
|
#include <signal.h> |
|
+#include <string.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "signal.h" |
|
#include "unwind.h" |
|
Index: regex.c |
|
--- regex.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ regex.c 2025-06-01 09:44:55.731848000 +0200 |
|
@@ -35,7 +35,6 @@ |
|
#include <signal.h> |
|
#include <stdarg.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "parser.h" |
|
#include "signal.h" |
|
Index: socket.c |
|
--- socket.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ socket.c 2025-06-01 09:44:55.731994000 +0200 |
|
@@ -39,8 +39,10 @@ |
|
#include <sys/socket.h> |
|
#include <sys/un.h> |
|
#include <netdb.h> |
|
+#include <sys/types.h> |
|
+#include <sys/socket.h> |
|
+#include <netinet/in.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#if HAVE_POLL |
|
#include <poll.h> |
|
#elif HAVE_SELECT |
|
@@ -71,6 +73,8 @@ |
|
|
|
#define MIN(A, B) ((A) < (B) ? (A) : (B)) |
|
|
|
+#define zalloca(size) memset(alloca(size), 0, size) |
|
+ |
|
struct dgram_stream { |
|
struct strm_base a; |
|
val stream; |
|
Index: stream.c |
|
--- stream.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ stream.c 2025-06-01 09:44:55.732415000 +0200 |
|
@@ -37,8 +37,13 @@ |
|
#include <ctype.h> |
|
#include <wchar.h> |
|
#include <wctype.h> |
|
+#include <sys/types.h> |
|
#include <signal.h> |
|
#include "config.h" |
|
+#ifdef __FreeBSD__ |
|
+#undef __XSI_VISIBLE |
|
+#define __XSI_VISIBLE 1 |
|
+#endif |
|
#if HAVE_UNISTD_H |
|
#include <unistd.h> |
|
#endif |
|
@@ -61,7 +66,6 @@ |
|
#if HAVE_ZLIB |
|
#include <zlib.h> |
|
#endif |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "gc.h" |
|
#include "signal.h" |
|
Index: struct.c |
|
--- struct.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ struct.c 2025-06-01 09:44:55.732645000 +0200 |
|
@@ -36,7 +36,6 @@ |
|
#include <assert.h> |
|
#include <wchar.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "hash.h" |
|
#include "eval.h" |
|
Index: sysif.c |
|
--- sysif.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ sysif.c 2025-06-01 09:44:55.732888000 +0200 |
|
@@ -31,6 +31,7 @@ |
|
#include <stddef.h> |
|
#include <stdio.h> |
|
#include <stdlib.h> |
|
+#include <stdarg.h> |
|
#include <string.h> |
|
#include <dirent.h> |
|
#include <wchar.h> |
|
@@ -92,7 +93,6 @@ |
|
#if HAVE_RLIMIT |
|
#include <sys/resource.h> |
|
#endif |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "stream.h" |
|
#include "hash.h" |
|
@@ -2716,7 +2716,9 @@ |
|
#endif |
|
reg_varl(intern(lit("enotsock"), user_package), num_fast(ENOTSOCK)); |
|
reg_varl(intern(lit("enotsup"), user_package), num_fast(ENOTSUP)); |
|
+#ifdef ENOTTY |
|
reg_varl(intern(lit("enotty"), user_package), num_fast(ENOTTY)); |
|
+#endif |
|
reg_varl(intern(lit("enxio"), user_package), num_fast(ENXIO)); |
|
reg_varl(intern(lit("eopnotsupp"), user_package), num_fast(EOPNOTSUPP)); |
|
reg_varl(intern(lit("eoverflow"), user_package), num_fast(EOVERFLOW)); |
|
Index: syslog.c |
|
--- syslog.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ syslog.c 2025-06-01 09:44:55.732965000 +0200 |
|
@@ -33,7 +33,6 @@ |
|
#include <wchar.h> |
|
#include <syslog.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "utf8.h" |
|
#define STREAM_IMPL |
|
Index: termios.c |
|
--- termios.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ termios.c 2025-06-01 09:44:55.733049000 +0200 |
|
@@ -36,7 +36,6 @@ |
|
#include <errno.h> |
|
#include <termios.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "gc.h" |
|
#include "args.h" |
|
Index: txr.c |
|
--- txr.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ txr.c 2025-06-01 09:44:55.733181000 +0200 |
|
@@ -30,6 +30,7 @@ |
|
#include <stdlib.h> |
|
#include <limits.h> |
|
#include <stdarg.h> |
|
+#include <stdlib.h> |
|
#include <wchar.h> |
|
#include <signal.h> |
|
#include "config.h" |
|
@@ -289,6 +290,10 @@ |
|
if (progname_u8 && realpath(progname_u8, self)) |
|
return string_utf8(self); |
|
|
|
+ char *p = getenv("TXR_INST_PATH"); |
|
+ if (p != NULL) |
|
+ return string_utf8(p); |
|
+ |
|
return lit(TXR_INST_PATH); |
|
} |
|
#endif |
|
Index: unwind.c |
|
--- unwind.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ unwind.c 2025-06-01 09:44:55.733308000 +0200 |
|
@@ -47,7 +47,6 @@ |
|
#include "eval.h" |
|
#include "struct.h" |
|
#include "cadr.h" |
|
-#include "alloca.h" |
|
#include "unwind.h" |
|
#include "debug.h" |
|
|
|
Index: vm.c |
|
--- vm.c.orig 2025-05-31 22:15:51.000000000 +0200 |
|
+++ vm.c 2025-06-01 09:44:55.733436000 +0200 |
|
@@ -33,7 +33,6 @@ |
|
#include <signal.h> |
|
#include <assert.h> |
|
#include "config.h" |
|
-#include "alloca.h" |
|
#include "lib.h" |
|
#include "eval.h" |
|
#include "signal.h"
|
|
|