mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
Add several bugfixes. Produce more informative messages when
segmentation violations and assertion failures occur. Support several system calls not supported previously. PR: This is part of the fix for ports/3572.
This commit is contained in:
parent
1602725275
commit
2a3e5ea907
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=7288
109
lang/modula-3-lib/files/extra-patch-old-sigset-aa
Normal file
109
lang/modula-3-lib/files/extra-patch-old-sigset-aa
Normal file
@ -0,0 +1,109 @@
|
||||
This patch corrects some errors in the Usignal interface for FreeBSD.
|
||||
|
||||
Index: m3/m3core/src/unix/freebsd-2/Usignal.i3
|
||||
--- Usignal.i3.orig Mon Aug 12 15:47:48 1996
|
||||
+++ Usignal.i3 Thu Jul 10 18:38:06 1997
|
||||
@@ -12,8 +12,6 @@
|
||||
|
||||
(*** <signal.h> ***)
|
||||
|
||||
- (* I don't know about all the indented values below from the
|
||||
- Linux implementation *)
|
||||
CONST
|
||||
SIGHUP = 1; (* hangup *)
|
||||
SIGINT = 2; (* interrupt *)
|
||||
@@ -23,27 +21,19 @@
|
||||
SIGIOT = 6; (* IOT instruction *)
|
||||
SIGEMT = 7; (* EMT instruction *)
|
||||
SIGFPE = 8; (* floating point exception *)
|
||||
- FPE_INTDIV_TRAP = 20; (* integer divide by zero *)
|
||||
- FPE_INTOVF_TRAP = 21; (* integer overflow *)
|
||||
- FPE_FLTOPERR_TRAP = 1; (* [floating operand error] *)
|
||||
- FPE_FLTDEN_TRAP = 2; (* [floating denormalized operand] *)
|
||||
- FPE_FLTDIV_TRAP = 3; (* [floating divide by zero] *)
|
||||
- FPE_FLTOVF_TRAP = 4; (* [floating overflow] *)
|
||||
- FPE_FLTUND_TRAP = 5; (* [floating underflow] *)
|
||||
- FPE_FLTINEX_TRAP = 6; (* [floating inexact result] *)
|
||||
- FPE_UUOP_TRAP = 7; (* [floating undefined opcode] *)
|
||||
- FPE_DATACH_TRAP = 8; (* [floating data chain exception] *)
|
||||
- FPE_FLTSTK_TRAP = 16; (* [floating stack fault] *)
|
||||
- FPE_FPA_ENABLE = 17; (* [FPA not enabled] *)
|
||||
- FPE_FPA_ERROR = 18; (* [FPA arithmetic exception] *)
|
||||
+ FPE_INTOVF_TRAP = 1; (* integer overflow *)
|
||||
+ FPE_INTDIV_TRAP = 2; (* integer divide by zero *)
|
||||
+ FPE_FLTDIV_TRAP = 3; (* floating/decimal divide by zero *)
|
||||
+ FPE_FLTOVF_TRAP = 4; (* floating overflow *)
|
||||
+ FPE_FLTUND_TRAP = 5; (* floating underflow *)
|
||||
+ FPE_FPU_NP_TRAP = 6; (* floating point unit not present *)
|
||||
+ FPE_SUBRNG_TRAP = 7; (* subrange out of bounds *)
|
||||
SIGKILL = 9; (* kill (cannot be caught or ignored) *)
|
||||
SIGBUS = 10; (* bus error *)
|
||||
- BUS_HWERR = 1; (* misc hardware error (e.g. timeout) *)
|
||||
- BUS_ALIGN = 2; (* hardware alignment error *)
|
||||
+ BUS_PAGE_FAULT = 12; (* page fault protection base *)
|
||||
+ BUS_SEGNP_FAULT = 26; (* segment not present *)
|
||||
+ BUS_STK_FAULT = 27; (* stack fault *)
|
||||
SIGSEGV = 11; (* segmentation violation *)
|
||||
- SEGV_NOMAP = 3; (* no mapping at the fault address *)
|
||||
- SEGV_PROT = 4; (* access exceeded protections *)
|
||||
- SEGV_OBJERR = 5; (* object returned errno value *)
|
||||
SIGSYS = 12; (* bad argument to system call *)
|
||||
SIGPIPE = 13; (* write on a pipe with no one to read it *)
|
||||
SIGALRM = 14; (* alarm clock *)
|
||||
@@ -61,9 +51,9 @@
|
||||
SIGVTALRM = 26; (* virtual time alarm *)
|
||||
SIGPROF = 27; (* profiling time alarm *)
|
||||
SIGWINCH = 28; (* window size changes *)
|
||||
- SIGLOST = 29; (* Sys-V rec lock: notify user upon server crash *)
|
||||
- SIGUSR1 = 30; (* User signal 1 (from SysV) *)
|
||||
- SIGUSR2 = 31; (* User signal 2 (from SysV) *)
|
||||
+ SIGINFO = 29; (* information request *)
|
||||
+ SIGUSR1 = 30; (* user defined signal 1 *)
|
||||
+ SIGUSR2 = 31; (* user defined signal 2 *)
|
||||
|
||||
(* System V definitions *)
|
||||
SIGCLD = SIGCHLD;
|
||||
@@ -80,7 +70,8 @@
|
||||
struct_sigvec = RECORD
|
||||
sv_handler: SignalHandler; (* signal handler *)
|
||||
sv_mask: sigset_t; (* signal mask to apply *)
|
||||
- sv_flags: int; (* see signal options below *) END;
|
||||
+ sv_flags: int; (* see signal options below *)
|
||||
+ END;
|
||||
|
||||
|
||||
CONST
|
||||
@@ -101,16 +92,10 @@
|
||||
SIG_SETMASK = 3; (* Set block mask to this mask *)
|
||||
|
||||
TYPE
|
||||
- SignalActionHandler = PROCEDURE (sig: int);
|
||||
- SignalRestoreHandler = PROCEDURE ();
|
||||
-
|
||||
struct_sigaction = RECORD
|
||||
- sa_handler : SignalActionHandler; (* signal handler *)
|
||||
+ sa_handler : SignalHandler; (* signal handler *)
|
||||
sa_mask : sigset_t; (* signals to block while in handler *)
|
||||
sa_flags : int; (* signal action flags *)
|
||||
- (* ow
|
||||
- sa_restorer : SignalRestoreHandler; (* restores interrupted state *)
|
||||
- *)
|
||||
END;
|
||||
|
||||
struct_sigaction_star = UNTRACED REF struct_sigaction;
|
||||
@@ -206,9 +191,15 @@
|
||||
|
||||
<*EXTERNAL*> PROCEDURE sigstack (VAR ss, oss: struct_sigstack): int;
|
||||
|
||||
+(*** sigsuspend(2) - release blocked signals and wait for interrupt ***)
|
||||
+
|
||||
+<*EXTERNAL*>
|
||||
+PROCEDURE sigsuspend (VAR sigmask: sigset_t): int;
|
||||
|
||||
(*** sigaction(2) - software signal facilities ***)
|
||||
|
||||
+(* FIXME - This should probably use the VAR construct like the other
|
||||
+ platforms use. *)
|
||||
<*EXTERNAL*>
|
||||
PROCEDURE sigaction (sig: int; act, oact: struct_sigaction_star): int;
|
||||
|
@ -1,15 +1,19 @@
|
||||
Fix a const-related compiler warning produced by the "execve" wrapper.
|
||||
Move network related wrappers to separate files, for SOCKS support.
|
||||
Fix some things so that it will compile under FreeBSD-3.0.
|
||||
Add a wrapper for the "chflags" system call.
|
||||
Add missing wrappers for various system calls.
|
||||
Fix numerous argument declarations to agree with their prototypes.
|
||||
Fix the wrapper for ftruncate so that it deals properly with the 64-bit
|
||||
arguments.
|
||||
|
||||
Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
--- RTHeapDepC.c.orig Sat Mar 23 14:52:21 1996
|
||||
+++ RTHeapDepC.c Wed Apr 23 10:01:01 1997
|
||||
@@ -92,6 +92,16 @@
|
||||
+++ RTHeapDepC.c Thu Jul 10 18:16:04 1997
|
||||
@@ -89,9 +89,20 @@
|
||||
#include <ufs/ufs/quota.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/stat.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
@ -26,7 +30,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
#ifdef NULL
|
||||
#undef NULL
|
||||
#endif
|
||||
@@ -110,22 +120,8 @@
|
||||
@@ -110,22 +121,8 @@
|
||||
/* Unless otherwise noted, all the following wrappers have the same
|
||||
structure. */
|
||||
|
||||
@ -50,7 +54,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
int mode;
|
||||
{ int result;
|
||||
|
||||
@@ -137,7 +133,7 @@
|
||||
@@ -137,7 +134,7 @@
|
||||
}
|
||||
|
||||
int acct(file) /* ok */
|
||||
@ -59,7 +63,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
@@ -228,19 +224,6 @@
|
||||
@@ -228,19 +225,6 @@
|
||||
}
|
||||
*/
|
||||
|
||||
@ -79,7 +83,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
/* not implemented
|
||||
int cachectl(addr, nbytes, op)
|
||||
char *addr;
|
||||
@@ -268,7 +251,7 @@
|
||||
@@ -268,7 +252,7 @@
|
||||
*/
|
||||
|
||||
int chdir(path) /* ok */
|
||||
@ -88,7 +92,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
@@ -278,6 +261,18 @@
|
||||
@@ -278,8 +262,20 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -105,9 +109,12 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
+}
|
||||
+
|
||||
int chmod(path, mode) /* ok */
|
||||
char *path;
|
||||
-char *path;
|
||||
+const char *path;
|
||||
mode_t mode;
|
||||
@@ -291,7 +286,7 @@
|
||||
{ int result;
|
||||
|
||||
@@ -291,7 +287,7 @@
|
||||
}
|
||||
|
||||
int chown(path, owner, group) /* ok */
|
||||
@ -116,7 +123,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
uid_t owner;
|
||||
gid_t group;
|
||||
{ int result;
|
||||
@@ -304,7 +299,7 @@
|
||||
@@ -304,7 +300,7 @@
|
||||
}
|
||||
|
||||
int chroot(dirname) /* ok */
|
||||
@ -125,7 +132,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
@@ -314,19 +309,6 @@
|
||||
@@ -314,19 +310,6 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -145,7 +152,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
/* not implemented (obsolete)
|
||||
int creat(name, mode)
|
||||
const char *name;
|
||||
@@ -356,8 +338,8 @@
|
||||
@@ -356,8 +339,8 @@
|
||||
result = syscall(SYS_execve, name, argv, envp);
|
||||
if (result == -1 && errno == EFAULT) {
|
||||
MAKE_READABLE(name);
|
||||
@ -156,7 +163,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
} else {
|
||||
return result;
|
||||
}
|
||||
@@ -473,7 +455,7 @@
|
||||
@@ -473,7 +456,7 @@
|
||||
|
||||
int getgroups(gidsetsize, grouplist) /* ok */
|
||||
int gidsetsize;
|
||||
@ -165,7 +172,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
@@ -513,20 +495,6 @@
|
||||
@@ -513,20 +496,6 @@
|
||||
}
|
||||
*/
|
||||
|
||||
@ -186,7 +193,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
int getrlimit(resource, rlp) /* ok */
|
||||
int resource;
|
||||
struct rlimit *rlp;
|
||||
@@ -551,20 +519,6 @@
|
||||
@@ -551,20 +520,6 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -207,9 +214,25 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
int getsockopt(s, level, optname, optval, optlen) /* ok */
|
||||
int s, level, optname;
|
||||
void *optval;
|
||||
@@ -630,8 +584,8 @@
|
||||
@@ -629,9 +584,24 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
+#ifdef SYS_lchown
|
||||
+int lchown(path, owner, group) /* ok */
|
||||
+const char *path;
|
||||
+uid_t owner;
|
||||
+gid_t group;
|
||||
+{ int result;
|
||||
+
|
||||
+ ENTER_CRITICAL;
|
||||
+ MAKE_READABLE(path);
|
||||
+ result = syscall(SYS_lchown, path, owner, group);
|
||||
+ EXIT_CRITICAL;
|
||||
+ return result;
|
||||
+}
|
||||
+#endif /* SYS_lchown */
|
||||
+
|
||||
int link(name1, name2) /* ok */
|
||||
-char *name1;
|
||||
-char *name2;
|
||||
@ -218,16 +241,47 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
@@ -668,7 +622,7 @@
|
||||
@@ -643,7 +613,7 @@
|
||||
}
|
||||
|
||||
int lstat(path, buf) /* ok */
|
||||
-char *path;
|
||||
+const char *path;
|
||||
struct stat *buf;
|
||||
{ int result;
|
||||
|
||||
@@ -656,7 +626,7 @@
|
||||
}
|
||||
|
||||
int mkdir(path, mode) /* ok */
|
||||
-char *path;
|
||||
+const char *path;
|
||||
mode_t mode;
|
||||
{ int result;
|
||||
|
||||
@@ -667,8 +637,20 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
+int mkfifo(path, mode) /* ok */
|
||||
+const char *path;
|
||||
+mode_t mode;
|
||||
+{ int result;
|
||||
+
|
||||
+ ENTER_CRITICAL;
|
||||
+ MAKE_READABLE(path);
|
||||
+ result = syscall(SYS_mkfifo, path, mode);
|
||||
+ EXIT_CRITICAL;
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
int mknod(path, mode, dev) /* ok */
|
||||
-char *path;
|
||||
+const char *path;
|
||||
mode_t mode;
|
||||
dev_t dev;
|
||||
{ int result;
|
||||
@@ -821,21 +775,8 @@
|
||||
@@ -821,21 +803,8 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -250,7 +304,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
char *buf;
|
||||
int bufsiz;
|
||||
{ int result;
|
||||
@@ -865,46 +806,6 @@
|
||||
@@ -865,46 +834,6 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -297,7 +351,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
int recvmsg(s, msg, flags) /* ok */
|
||||
int s;
|
||||
struct msghdr msg[];
|
||||
@@ -940,7 +841,7 @@
|
||||
@@ -940,7 +869,7 @@
|
||||
}
|
||||
|
||||
int rmdir(path) /* ok */
|
||||
@ -306,7 +360,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
@@ -950,24 +851,6 @@
|
||||
@@ -950,24 +879,6 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -331,7 +385,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
int semctl(semid, semnum, cmd, arg) /* ok ? */
|
||||
int semid, cmd;
|
||||
int semnum;
|
||||
@@ -1012,24 +895,6 @@
|
||||
@@ -1012,24 +923,6 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -356,7 +410,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
int sendmsg(s, msg, flags) /* ok */
|
||||
int s;
|
||||
const struct msghdr msg[];
|
||||
@@ -1051,29 +916,8 @@
|
||||
@@ -1051,29 +944,8 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -387,7 +441,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
int namelen;
|
||||
{ int result;
|
||||
|
||||
@@ -1086,7 +930,7 @@
|
||||
@@ -1086,7 +958,7 @@
|
||||
|
||||
int setgroups(ngroups, gidset) /* ok */
|
||||
int ngroups;
|
||||
@ -396,7 +450,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
@@ -1097,7 +941,7 @@
|
||||
@@ -1097,7 +969,7 @@
|
||||
}
|
||||
|
||||
int sethostname(name, namelen) /* ok */
|
||||
@ -405,7 +459,95 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
int namelen;
|
||||
{ int result;
|
||||
#if __FreeBSD__ >= 2
|
||||
@@ -1280,7 +1124,7 @@
|
||||
@@ -1213,20 +1085,20 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
-/* not implemented
|
||||
-int sigpending(set)
|
||||
-sigset_t *set;
|
||||
+int sigaction(sig, act, oact)
|
||||
+int sig;
|
||||
+const struct sigaction *act;
|
||||
+struct sigaction *oact;
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
- MAKE_WRITABLE(set);
|
||||
- result = syscall(SYS_sigpending, set);
|
||||
+ MAKE_READABLE(act);
|
||||
+ MAKE_WRITABLE(oact);
|
||||
+ result = syscall(SYS_sigaction, sig, act, oact);
|
||||
EXIT_CRITICAL;
|
||||
return result;
|
||||
}
|
||||
-*/
|
||||
|
||||
-#if __FreeBSD__ >= 2
|
||||
int sigaltstack(ss, oss) /* ok */
|
||||
const struct sigaltstack *ss;
|
||||
struct sigaltstack *oss;
|
||||
@@ -1239,20 +1111,42 @@
|
||||
EXIT_CRITICAL;
|
||||
return result;
|
||||
}
|
||||
-#else
|
||||
-int sigstack(ss, oss) /* ok */
|
||||
-const struct sigstack *ss;
|
||||
-struct sigstack *oss;
|
||||
+
|
||||
+int sigpending(set)
|
||||
+sigset_t *set;
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
- MAKE_READABLE(ss);
|
||||
- MAKE_WRITABLE(oss);
|
||||
- result = syscall(SYS_sigstack, ss, oss);
|
||||
+ MAKE_WRITABLE(set);
|
||||
+ result = syscall(SYS_sigpending, set);
|
||||
+ EXIT_CRITICAL;
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+int sigprocmask(how, set, oset)
|
||||
+int how;
|
||||
+const sigset_t *set;
|
||||
+sigset_t *oset;
|
||||
+{ int result;
|
||||
+
|
||||
+ ENTER_CRITICAL;
|
||||
+ MAKE_READABLE(set);
|
||||
+ MAKE_WRITABLE(oset);
|
||||
+ result = syscall(SYS_sigprocmask, how, set, oset);
|
||||
+ EXIT_CRITICAL;
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+int sigsuspend(sigmask)
|
||||
+const sigset_t *sigmask;
|
||||
+{ int result;
|
||||
+
|
||||
+ ENTER_CRITICAL;
|
||||
+ MAKE_WRITABLE(sigmask);
|
||||
+ result = syscall(SYS_sigsuspend, sigmask);
|
||||
EXIT_CRITICAL;
|
||||
return result;
|
||||
}
|
||||
-#endif
|
||||
|
||||
int socketpair(d, type, protocol, sv) /* ok */
|
||||
int d, type, protocol;
|
||||
@@ -1267,7 +1161,7 @@
|
||||
}
|
||||
|
||||
int stat(path, buf) /* ok */
|
||||
-char *path;
|
||||
+const char *path;
|
||||
struct stat *buf;
|
||||
{ int result;
|
||||
|
||||
@@ -1280,7 +1174,7 @@
|
||||
}
|
||||
|
||||
int swapon(special) /* ok */
|
||||
@ -414,7 +556,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
@@ -1291,8 +1135,8 @@
|
||||
@@ -1291,8 +1185,8 @@
|
||||
}
|
||||
|
||||
int symlink(name1, name2) /* ok */
|
||||
@ -425,7 +567,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
@@ -1304,14 +1148,14 @@
|
||||
@@ -1304,14 +1198,14 @@
|
||||
}
|
||||
|
||||
int truncate(path, length) /* ok */
|
||||
@ -444,7 +586,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
EXIT_CRITICAL;
|
||||
return result;
|
||||
}
|
||||
@@ -1328,7 +1172,7 @@
|
||||
@@ -1328,7 +1222,7 @@
|
||||
}
|
||||
|
||||
int unlink(path) /* ok */
|
||||
@ -453,7 +595,7 @@ Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
||||
{ int result;
|
||||
|
||||
ENTER_CRITICAL;
|
||||
@@ -1414,19 +1258,6 @@
|
||||
@@ -1414,19 +1308,6 @@
|
||||
ENTER_CRITICAL;
|
||||
MAKE_WRITABLE(status);
|
||||
result = syscall(SYS_wait4, pid, status, options, NULL);
|
||||
|
@ -195,7 +195,7 @@ Index: m3/m3build/templates/FreeBSD2
|
||||
proc after_library_hooks(x) is
|
||||
local lib_a = format ("lib%s.a", x)
|
||||
- local lib_so = format ("lib%s.so.1.1", x)
|
||||
+ local lib_so = format ("lib%s.so.4.3", x)
|
||||
+ local lib_so = format ("lib%s.so.5.0", x)
|
||||
local dest = format ("%s%s%s%s%s", PKG_INSTALL, SL, BUILD_PACKAGE,
|
||||
SL, BUILD_DIR)
|
||||
|
||||
|
@ -1,9 +1,22 @@
|
||||
Support for SOCKS wrappers in Unix.i3.
|
||||
Also add some missing system call declarations.
|
||||
|
||||
Index: m3/m3core/src/unix/freebsd-2/Unix.i3
|
||||
--- Unix.i3.orig Sat Jan 7 14:41:42 1995
|
||||
+++ Unix.i3 Tue Oct 8 14:20:50 1996
|
||||
@@ -94,7 +94,7 @@
|
||||
+++ Unix.i3 Thu Jul 10 18:32:36 1997
|
||||
@@ -84,9 +84,10 @@
|
||||
<*EXTERNAL*> PROCEDURE fchmod (fd, mode: mode_t): int;
|
||||
(* ok *)
|
||||
|
||||
-(*** chown, fchown - change owner and group of a file ***)
|
||||
+(*** chown, fchown, lchown - change owner and group of a file ***)
|
||||
<*EXTERNAL*> PROCEDURE chown (path: char_star; owner: uid_t; group: gid_t): int;
|
||||
<*EXTERNAL*> PROCEDURE fchown (fd: int; owner: uid_t; group: gid_t): int;
|
||||
+<*EXTERNAL*> PROCEDURE lchown (path: char_star; owner: uid_t; group: gid_t): int;
|
||||
(* ok *)
|
||||
|
||||
(*** chroot - change root directory ***)
|
||||
@@ -94,7 +95,7 @@
|
||||
(* ok *)
|
||||
|
||||
(*** close - delete a descriptor ***)
|
||||
@ -12,7 +25,7 @@ Index: m3/m3core/src/unix/freebsd-2/Unix.i3
|
||||
(* ok *)
|
||||
|
||||
(*** creat - create a new file ***)
|
||||
@@ -102,8 +102,8 @@
|
||||
@@ -102,8 +103,8 @@
|
||||
(* ok, but obsolete *)
|
||||
|
||||
(*** dup, dup2 - duplicate an open file descriptor ***)
|
||||
@ -23,7 +36,17 @@ Index: m3/m3core/src/unix/freebsd-2/Unix.i3
|
||||
(* ok *)
|
||||
|
||||
(*** execve - execute a file ***)
|
||||
@@ -892,7 +892,7 @@
|
||||
@@ -773,6 +774,9 @@
|
||||
PROCEDURE lseek (d: int; offset: off_t; whence: int): off_t;
|
||||
(* ok *)
|
||||
|
||||
+(*** mkfifo - make a FIFO (named pipe) ***)
|
||||
+<*EXTERNAL*> PROCEDURE mkfifo (path: char_star; mode: mode_t): int;
|
||||
+
|
||||
(*** mkdir - make a directory file ***)
|
||||
<*EXTERNAL*> PROCEDURE mkdir (path: char_star; mode: mode_t): int;
|
||||
(* ok *)
|
||||
@@ -892,7 +896,7 @@
|
||||
TYPE
|
||||
FDSet = SET OF [0 .. MAX_FDSET - 1];
|
||||
|
||||
|
113
lang/modula-3-lib/files/patch-bp
Normal file
113
lang/modula-3-lib/files/patch-bp
Normal file
@ -0,0 +1,113 @@
|
||||
This patch uses the sigaction interface to gain access to the PC value
|
||||
so that it can be printed out when a fatal signal occurs.
|
||||
|
||||
Index: m3/m3core/src/runtime/FreeBSD2/RTSignal.m3
|
||||
--- RTSignal.m3.orig Mon Nov 21 10:31:19 1994
|
||||
+++ RTSignal.m3 Thu Jul 10 14:24:59 1997
|
||||
@@ -7,18 +7,21 @@
|
||||
|
||||
UNSAFE MODULE RTSignal;
|
||||
|
||||
-IMPORT RTMisc, RTProcess, Csignal, Usignal, Uprocess;
|
||||
+IMPORT RTMisc, RTProcess, Usignal, Uprocess;
|
||||
FROM Ctypes IMPORT int;
|
||||
|
||||
+TYPE
|
||||
+ SigInfo = UNTRACED REF Usignal.struct_sigcontext;
|
||||
+
|
||||
VAR
|
||||
- DefaultHandler : Csignal.Handler;
|
||||
- IgnoreSignal : Csignal.Handler;
|
||||
- initial_handlers : ARRAY [0..5] OF Csignal.Handler;
|
||||
+ DefaultHandler : Usignal.SignalHandler;
|
||||
+ IgnoreSignal : Usignal.SignalHandler;
|
||||
+ initial_handlers : ARRAY [0..5] OF Usignal.struct_sigaction;
|
||||
|
||||
PROCEDURE InstallHandlers () =
|
||||
BEGIN
|
||||
- DefaultHandler := LOOPHOLE (0, Csignal.Handler);
|
||||
- IgnoreSignal := LOOPHOLE (1, Csignal.Handler);
|
||||
+ DefaultHandler := LOOPHOLE (0, Usignal.SignalHandler);
|
||||
+ IgnoreSignal := LOOPHOLE (1, Usignal.SignalHandler);
|
||||
|
||||
SetHandler (0, Usignal.SIGHUP, Shutdown);
|
||||
SetHandler (1, Usignal.SIGINT, Interrupt);
|
||||
@@ -28,13 +31,18 @@
|
||||
SetHandler (5, Usignal.SIGTERM, Shutdown);
|
||||
END InstallHandlers;
|
||||
|
||||
-PROCEDURE SetHandler (id: INTEGER; sig: int; handler: Csignal.Handler) =
|
||||
- VAR old := Csignal.signal (sig, handler);
|
||||
- BEGIN
|
||||
- initial_handlers[id] := old;
|
||||
- IF (old # DefaultHandler) THEN
|
||||
+PROCEDURE SetHandler (id: INTEGER; sig: int; handler: Usignal.SignalHandler) =
|
||||
+ (* Note: we use the LOOPHOLE to prevent the runtime check for
|
||||
+ nested procedure. The runtime check crashes when
|
||||
+ handler = IgnoreSignal = 1. *)
|
||||
+ VAR new: Usignal.struct_sigaction;
|
||||
+ BEGIN
|
||||
+ new.sa_handler := LOOPHOLE (handler, Usignal.SignalHandler);
|
||||
+ new.sa_flags := 0;
|
||||
+ EVAL Usignal.sigaction (sig, ADR(new), ADR(initial_handlers[id]));
|
||||
+ IF (initial_handlers[id].sa_handler # DefaultHandler) THEN
|
||||
(* don't override inherited, non-default handlers *)
|
||||
- EVAL Csignal.signal (sig, old);
|
||||
+ EVAL Usignal.sigaction (sig, ADR(initial_handlers[id]), ADR(new));
|
||||
END;
|
||||
END SetHandler;
|
||||
|
||||
@@ -50,36 +58,43 @@
|
||||
|
||||
PROCEDURE RestoreHandler (id: INTEGER; sig: int) =
|
||||
BEGIN
|
||||
- EVAL Csignal.signal (sig, initial_handlers[id]);
|
||||
+ EVAL Usignal.sigaction (sig, ADR(initial_handlers[id]), NIL);
|
||||
END RestoreHandler;
|
||||
|
||||
-PROCEDURE Shutdown (sig: int) =
|
||||
+PROCEDURE Shutdown (sig: int; <*UNUSED*> code: int; <*UNUSED*> scp: SigInfo) =
|
||||
+ VAR new, old: Usignal.struct_sigaction;
|
||||
BEGIN
|
||||
+ new.sa_handler := DefaultHandler;
|
||||
+ new.sa_flags := 0;
|
||||
RTProcess.InvokeExitors (); (* flush stdio... *)
|
||||
- EVAL Csignal.signal (sig, DefaultHandler); (* restore default handler *)
|
||||
+ EVAL Usignal.sigaction (sig, ADR(new), ADR(old)); (* restore default handler *)
|
||||
EVAL Usignal.kill (Uprocess.getpid (), sig); (* and resend the signal *)
|
||||
END Shutdown;
|
||||
|
||||
-PROCEDURE Interrupt (sig: int) =
|
||||
+PROCEDURE Interrupt (sig: int; code: int; scp: SigInfo) =
|
||||
VAR h := RTProcess.OnInterrupt (NIL);
|
||||
BEGIN
|
||||
IF (h = NIL) THEN
|
||||
- Shutdown (sig);
|
||||
+ Shutdown (sig, code, scp);
|
||||
ELSE
|
||||
EVAL RTProcess.OnInterrupt (h); (* reinstall the handler *)
|
||||
h ();
|
||||
END;
|
||||
END Interrupt;
|
||||
|
||||
-PROCEDURE Quit (<*UNUSED*> sig: int) =
|
||||
+PROCEDURE Quit (<*UNUSED*> sig, code: int; scp: SigInfo) =
|
||||
+ VAR pc := 0;
|
||||
BEGIN
|
||||
- RTMisc.FatalErrorI ("aborted", 0);
|
||||
+ IF (scp # NIL) THEN pc := scp.sc_eip END;
|
||||
+ RTMisc.FatalErrorPC (pc, "aborted");
|
||||
END Quit;
|
||||
|
||||
-PROCEDURE SegV (<*UNUSED*> sig: int) =
|
||||
+PROCEDURE SegV (<*UNUSED*> sig, code: int; scp: SigInfo) =
|
||||
+ VAR pc := 0;
|
||||
BEGIN
|
||||
- RTMisc.FatalErrorI (
|
||||
- "Segmentation violation - possible attempt to dereference NIL", 0);
|
||||
+ IF (scp # NIL) THEN pc := scp.sc_eip END;
|
||||
+ RTMisc.FatalErrorPC (pc,
|
||||
+ "Segmentation violation - possible attempt to dereference NIL");
|
||||
END SegV;
|
||||
|
||||
BEGIN
|
32
lang/modula-3-lib/files/patch-bq
Normal file
32
lang/modula-3-lib/files/patch-bq
Normal file
@ -0,0 +1,32 @@
|
||||
Add chflags(2) and fchflags(2) to Ustat.i3.
|
||||
|
||||
Index: m3/m3core/src/unix/freebsd-2/Ustat.i3
|
||||
--- Ustat.i3.orig Wed Mar 15 16:47:47 1995
|
||||
+++ Ustat.i3 Thu Jul 10 18:41:32 1997
|
||||
@@ -70,4 +70,26 @@
|
||||
|
||||
<*EXTERNAL*> PROCEDURE fstat (fd: int; buf: struct_stat_star): int;
|
||||
|
||||
+(* chflags, fchflags *)
|
||||
+CONST
|
||||
+ (* Definitions of flags stored in file flags word. *)
|
||||
+ (* Super-user and owner changeable flags. *)
|
||||
+ UF_SETTABLE = 16_0000ffff; (* mask of owner changeable flags *)
|
||||
+ UF_NODUMP = 16_00000001; (* do not dump file *)
|
||||
+ UF_IMMUTABLE = 16_00000002; (* file may not be changed *)
|
||||
+ UF_APPEND = 16_00000004; (* writes to file may only append *)
|
||||
+ UF_OPAQUE = 16_00000008; (* directory is opaque wrt. union *)
|
||||
+
|
||||
+ (* Super-user changeable flags. *)
|
||||
+ SF_SETTABLE = 16_ffff0000; (* mask of superuser changeable flags *)
|
||||
+ SF_ARCHIVED = 16_00010000; (* file is archived *)
|
||||
+ SF_IMMUTABLE = 16_00020000; (* file may not be changed *)
|
||||
+ SF_APPEND = 16_00040000; (* writes to file may only append *)
|
||||
+
|
||||
+<*EXTERNAL*>
|
||||
+PROCEDURE chflags(path: char_star; flags: u_long): int;
|
||||
+
|
||||
+<*EXTERNAL*>
|
||||
+PROCEDURE fchflags(fd: int; flags: u_long): int;
|
||||
+
|
||||
END Ustat.
|
@ -1,43 +1,43 @@
|
||||
etc/rc.d/50.m3.sh
|
||||
lib/m3/FreeBSD2/libDiGraph.so.4.3
|
||||
lib/m3/FreeBSD2/libGeometry.so.4.3
|
||||
lib/m3/FreeBSD2/libImages.so.4.3
|
||||
lib/m3/FreeBSD2/libTempFiles.so.4.3
|
||||
lib/m3/FreeBSD2/libjvideo.so.4.3
|
||||
lib/m3/FreeBSD2/libm3.so.4.3
|
||||
lib/m3/FreeBSD2/libm3X11R4.so.4.3
|
||||
lib/m3/FreeBSD2/libm3core.so.4.3
|
||||
lib/m3/FreeBSD2/libm3formsvbt.so.4.3
|
||||
lib/m3/FreeBSD2/libm3formsvbtpixmaps.so.4.3
|
||||
lib/m3/FreeBSD2/libm3parseparams.so.4.3
|
||||
lib/m3/FreeBSD2/libm3tcp.so.4.3
|
||||
lib/m3/FreeBSD2/libm3tools.so.4.3
|
||||
lib/m3/FreeBSD2/libm3ui.so.4.3
|
||||
lib/m3/FreeBSD2/libm3vbtkit.so.4.3
|
||||
lib/m3/FreeBSD2/libset.so.4.3
|
||||
lib/m3/FreeBSD2/libtable-list.so.4.3
|
||||
lib/m3/FreeBSD2/libtcpextras.so.4.3
|
||||
lib/m3/FreeBSD2/libvideovbt.so.4.3
|
||||
lib/m3/FreeBSD2/libweb.so.4.3
|
||||
lib/m3/pkg/X11R4/FreeBSD2/libm3X11R4.so.4.3
|
||||
lib/m3/pkg/digraph/FreeBSD2/libDiGraph.so.4.3
|
||||
lib/m3/pkg/formsvbt/FreeBSD2/libm3formsvbt.so.4.3
|
||||
lib/m3/pkg/formsvbtpixmaps/FreeBSD2/libm3formsvbtpixmaps.so.4.3
|
||||
lib/m3/pkg/images/FreeBSD2/libImages.so.4.3
|
||||
lib/m3/pkg/jvideo/FreeBSD2/libjvideo.so.4.3
|
||||
lib/m3/pkg/libm3/FreeBSD2/libm3.so.4.3
|
||||
lib/m3/pkg/m3core/FreeBSD2/libm3core.so.4.3
|
||||
lib/m3/pkg/m3tools/FreeBSD2/libm3tools.so.4.3
|
||||
lib/m3/pkg/parseparams/FreeBSD2/libm3parseparams.so.4.3
|
||||
lib/m3/pkg/realgeometry/FreeBSD2/libGeometry.so.4.3
|
||||
lib/m3/pkg/set/FreeBSD2/libset.so.4.3
|
||||
lib/m3/pkg/table-list/FreeBSD2/libtable-list.so.4.3
|
||||
lib/m3/pkg/tcp/FreeBSD2/libm3tcp.so.4.3
|
||||
lib/m3/pkg/tcpextras/FreeBSD2/libtcpextras.so.4.3
|
||||
lib/m3/pkg/tempfiles/FreeBSD2/libTempFiles.so.4.3
|
||||
lib/m3/pkg/ui/FreeBSD2/libm3ui.so.4.3
|
||||
lib/m3/pkg/vbtkit/FreeBSD2/libm3vbtkit.so.4.3
|
||||
lib/m3/pkg/videovbt/FreeBSD2/libvideovbt.so.4.3
|
||||
lib/m3/pkg/web/FreeBSD2/libweb.so.4.3
|
||||
lib/m3/FreeBSD2/libDiGraph.so.5.0
|
||||
lib/m3/FreeBSD2/libGeometry.so.5.0
|
||||
lib/m3/FreeBSD2/libImages.so.5.0
|
||||
lib/m3/FreeBSD2/libTempFiles.so.5.0
|
||||
lib/m3/FreeBSD2/libjvideo.so.5.0
|
||||
lib/m3/FreeBSD2/libm3.so.5.0
|
||||
lib/m3/FreeBSD2/libm3X11R4.so.5.0
|
||||
lib/m3/FreeBSD2/libm3core.so.5.0
|
||||
lib/m3/FreeBSD2/libm3formsvbt.so.5.0
|
||||
lib/m3/FreeBSD2/libm3formsvbtpixmaps.so.5.0
|
||||
lib/m3/FreeBSD2/libm3parseparams.so.5.0
|
||||
lib/m3/FreeBSD2/libm3tcp.so.5.0
|
||||
lib/m3/FreeBSD2/libm3tools.so.5.0
|
||||
lib/m3/FreeBSD2/libm3ui.so.5.0
|
||||
lib/m3/FreeBSD2/libm3vbtkit.so.5.0
|
||||
lib/m3/FreeBSD2/libset.so.5.0
|
||||
lib/m3/FreeBSD2/libtable-list.so.5.0
|
||||
lib/m3/FreeBSD2/libtcpextras.so.5.0
|
||||
lib/m3/FreeBSD2/libvideovbt.so.5.0
|
||||
lib/m3/FreeBSD2/libweb.so.5.0
|
||||
lib/m3/pkg/X11R4/FreeBSD2/libm3X11R4.so.5.0
|
||||
lib/m3/pkg/digraph/FreeBSD2/libDiGraph.so.5.0
|
||||
lib/m3/pkg/formsvbt/FreeBSD2/libm3formsvbt.so.5.0
|
||||
lib/m3/pkg/formsvbtpixmaps/FreeBSD2/libm3formsvbtpixmaps.so.5.0
|
||||
lib/m3/pkg/images/FreeBSD2/libImages.so.5.0
|
||||
lib/m3/pkg/jvideo/FreeBSD2/libjvideo.so.5.0
|
||||
lib/m3/pkg/libm3/FreeBSD2/libm3.so.5.0
|
||||
lib/m3/pkg/m3core/FreeBSD2/libm3core.so.5.0
|
||||
lib/m3/pkg/m3tools/FreeBSD2/libm3tools.so.5.0
|
||||
lib/m3/pkg/parseparams/FreeBSD2/libm3parseparams.so.5.0
|
||||
lib/m3/pkg/realgeometry/FreeBSD2/libGeometry.so.5.0
|
||||
lib/m3/pkg/set/FreeBSD2/libset.so.5.0
|
||||
lib/m3/pkg/table-list/FreeBSD2/libtable-list.so.5.0
|
||||
lib/m3/pkg/tcp/FreeBSD2/libm3tcp.so.5.0
|
||||
lib/m3/pkg/tcpextras/FreeBSD2/libtcpextras.so.5.0
|
||||
lib/m3/pkg/tempfiles/FreeBSD2/libTempFiles.so.5.0
|
||||
lib/m3/pkg/ui/FreeBSD2/libm3ui.so.5.0
|
||||
lib/m3/pkg/vbtkit/FreeBSD2/libm3vbtkit.so.5.0
|
||||
lib/m3/pkg/videovbt/FreeBSD2/libvideovbt.so.5.0
|
||||
lib/m3/pkg/web/FreeBSD2/libweb.so.5.0
|
||||
share/modula-3-lib/COPYRIGHT
|
||||
@exec /sbin/ldconfig -m %D/lib/m3/FreeBSD2
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Date created: 18 Mar 1996
|
||||
# Whom: John Polstra <jdp@polstra.com>
|
||||
#
|
||||
# $Id: Makefile,v 1.13 1997/06/29 20:43:17 jdp Exp $
|
||||
# $Id: Makefile,v 1.14 1997/07/04 17:31:31 jdp Exp $
|
||||
#
|
||||
|
||||
DISTNAME= modula-3-3.6
|
||||
@ -21,8 +21,8 @@ NO_BUILD= yes
|
||||
|
||||
# Keep these in sync with the PLIST and with the library version numbers
|
||||
# in the modula-3-lib port.
|
||||
major= 4
|
||||
minor= 3
|
||||
major= 5
|
||||
minor= 0
|
||||
|
||||
# The Modula-3 build process insists on installing each individual
|
||||
# component immediately after that component is built. To avoid having
|
||||
|
@ -2,8 +2,8 @@ bin/analyze_coverage
|
||||
bin/formsedit
|
||||
bin/m3browser
|
||||
bin/m3build
|
||||
bin/m3build-4
|
||||
bin/m3build-4.3
|
||||
bin/m3build-5
|
||||
bin/m3build-5.0
|
||||
bin/m3bundle
|
||||
bin/m3pp
|
||||
bin/m3ship
|
||||
@ -16,7 +16,7 @@ bin/replayheap
|
||||
bin/showheap
|
||||
bin/shownew
|
||||
bin/showthread
|
||||
lib/m3/FreeBSD2/libm3configvars.so.4.3
|
||||
lib/m3/FreeBSD2/libm3configvars.so.5.0
|
||||
lib/m3/FreeBSD2/m3
|
||||
lib/m3/FreeBSD2/m3cgc1
|
||||
lib/m3/FreeBSD2/m3mkdir
|
||||
@ -313,7 +313,7 @@ lib/m3/pkg/m3configvars/FreeBSD2/.M3IMPTAB
|
||||
lib/m3/pkg/m3configvars/FreeBSD2/.M3WEB
|
||||
lib/m3/pkg/m3configvars/FreeBSD2/libm3configvars.a
|
||||
lib/m3/pkg/m3configvars/FreeBSD2/libm3configvars.m3x
|
||||
lib/m3/pkg/m3configvars/FreeBSD2/libm3configvars.so.4.3
|
||||
lib/m3/pkg/m3configvars/FreeBSD2/libm3configvars.so.5.0
|
||||
lib/m3/pkg/m3configvars/src/M3ConfigVars.i3
|
||||
lib/m3/pkg/m3core/FreeBSD2/.M3EXPORTS
|
||||
lib/m3/pkg/m3core/FreeBSD2/.M3IMPTAB
|
||||
|
Loading…
Reference in New Issue
Block a user