head	1.14;
access;
symbols
	RELEASE_4_3_0:1.13
	RELEASE_4_2_0:1.13
	RELEASE_4_1_1:1.13
	RELEASE_4_1_0:1.13
	RELEASE_3_5_0:1.13
	RELEASE_4_0_0:1.13
	RELEASE_3_4_0:1.12
	RELEASE_3_3_0:1.12
	RELEASE_3_2_0:1.12
	RELEASE_3_1_0:1.11
	RELEASE_2_2_8:1.11
	RELEASE_3_0_0:1.11
	RELEASE_2_2_7:1.9
	RELEASE_2_2_6:1.8
	RELEASE_2_2_5:1.7
	RELEASE_2_2_1:1.1.1.1
	RELEASE_2_2_2:1.4
	jdp_1_0:1.1.1.1
	JDP:1.1.1;
locks; strict;
comment	@# @;


1.14
date	2001.07.21.23.41.36;	author jdp;	state dead;
branches;
next	1.13;

1.13
date	99.12.23.17.34.59;	author jdp;	state Exp;
branches;
next	1.12;

1.12
date	99.03.14.14.00.07;	author jdp;	state Exp;
branches;
next	1.11;

1.11
date	98.10.06.03.01.41;	author jdp;	state Exp;
branches;
next	1.10;

1.10
date	98.09.19.17.49.22;	author jdp;	state Exp;
branches;
next	1.9;

1.9
date	98.06.02.23.21.26;	author jdp;	state Exp;
branches;
next	1.8;

1.8
date	98.01.17.21.12.09;	author jdp;	state Exp;
branches;
next	1.7;

1.7
date	97.09.25.01.30.33;	author jdp;	state Exp;
branches;
next	1.6;

1.6
date	97.07.11.05.51.28;	author jdp;	state Exp;
branches;
next	1.5;

1.5
date	97.07.11.05.16.43;	author jdp;	state Exp;
branches;
next	1.4;

1.4
date	97.04.23.17.07.55;	author jdp;	state Exp;
branches;
next	1.3;

1.3
date	97.03.26.21.26.23;	author jdp;	state Exp;
branches;
next	1.2;

1.2
date	97.03.26.21.16.53;	author jdp;	state Exp;
branches;
next	1.1;

1.1
date	96.10.29.23.01.51;	author jdp;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.10.29.23.01.51;	author jdp;	state Exp;
branches;
next	;


desc
@@


1.14
log
@Remove the old modula-3 and modula-3-lib ports.  They are superseded
by the pm3-* family of ports, which build a newer and better-maintained
version of Modula-3.  I have converted all ports which depended on
modula-3 to use pm3-* instead.

PR:		ports/27664 is rendered irrelevant
@
text
@--- m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c.orig	Sat Mar 23 14:52:21 1996
+++ m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c	Wed Dec 22 22:43:12 1999
@@@@ -80,7 +80,8 @@@@
 #include <sys/file.h>
 #include <sys/param.h>
 #if __FreeBSD__ >= 2
-# include <sys/sysctl.h>
+#include <sys/sysctl.h>
+#include <osreldate.h>
 #endif
 #include <sys/mount.h>
 #include <sys/ipc.h>
@@@@ -89,9 +90,27 @@@@
 #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>
 
+#if __FreeBSD__ >= 3
+#include <sys/time.h>
+#include <nfs/rpcv2.h>
+#include <nfs/nfsproto.h>
+#include <nfs/nfs.h>
+#include <ufs/ufs/ufsmount.h>
+#endif
+
+#include <string.h>
+#include <unistd.h>
+
+#if __FreeBSD_version >= 400013
+#define SOCKLEN_T	socklen_t
+#else
+#define SOCKLEN_T	int
+#endif
+
 #ifdef   NULL
 #undef   NULL
 #endif
@@@@ -110,22 +129,8 @@@@
 /* Unless otherwise noted, all the following wrappers have the same
    structure. */
 
-int accept(s, addr, addrlen)   /* ok */
-int s;
-struct sockaddr *addr;
-int *addrlen;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_WRITABLE(addr);
-  MAKE_WRITABLE(addrlen);
-  result = syscall(SYS_accept, s, addr, addrlen);
-  EXIT_CRITICAL;
-  return result;
-}
-
 int access(path, mode)   /* ok */
-char *path;
+const char *path;
 int mode;
 { int result;
 
@@@@ -137,7 +142,7 @@@@
 }
 
 int acct(file)   /* ok */
-char *file;
+const char *file;
 { int result;
 
   ENTER_CRITICAL;
@@@@ -228,19 +233,6 @@@@
 }
 */
 
-int bind(s, name, namelen)   /* ok */
-int s;
-const struct sockaddr *name;
-int namelen;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_READABLE(name);
-  result = syscall(SYS_bind, s, name, namelen);
-  EXIT_CRITICAL;
-  return result;
-}
-
 /* not implemented
 int cachectl(addr, nbytes, op)
 char *addr;
@@@@ -268,7 +260,7 @@@@
 */
 
 int chdir(path)   /* ok */
-char *path;
+const char *path;
 { int result;
 
   ENTER_CRITICAL;
@@@@ -278,8 +270,20 @@@@
   return result;
 }
 
+int chflags(path, flags)
+const char *path;
+u_long flags;
+{ int result;
+
+  ENTER_CRITICAL;
+  MAKE_READABLE(path);
+  result = syscall(SYS_chflags, path, flags);
+  EXIT_CRITICAL;
+  return result;
+}
+
 int chmod(path, mode)   /* ok */
-char *path;
+const char *path;
 mode_t mode;
 { int result;
 
@@@@ -291,7 +295,7 @@@@
 }
 
 int chown(path, owner, group)   /* ok */
-char *path;
+const char *path;
 uid_t owner;
 gid_t group;
 { int result;
@@@@ -304,7 +308,7 @@@@
 }
 
 int chroot(dirname)   /* ok */
-char *dirname;
+const char *dirname;
 { int result;
 
   ENTER_CRITICAL;
@@@@ -314,19 +318,6 @@@@
   return result;
 }
 
-int connect(s, name, namelen)   /* ok */
-int s;
-const struct sockaddr *name;
-int namelen;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_READABLE(name);
-  result = syscall(SYS_connect, s, name, namelen);
-  EXIT_CRITICAL;
-  return result;
-}
-
 /* not implemented (obsolete)
 int creat(name, mode)   
 const char *name;
@@@@ -356,8 +347,8 @@@@
     result = syscall(SYS_execve, name, argv, envp);
     if (result == -1 && errno == EFAULT) {
       MAKE_READABLE(name);
-      { char **a; for (a = argv; *a; a++) MAKE_READABLE(*a); }
-      { char **e; for (e = envp; *e; e++) MAKE_READABLE(*e); }
+      { char * const *a; for (a = argv; *a; a++) MAKE_READABLE(*a); }
+      { char * const *e; for (e = envp; *e; e++) MAKE_READABLE(*e); }
     } else {
       return result;
     }
@@@@ -473,7 +464,7 @@@@
 
 int getgroups(gidsetsize, grouplist)   /* ok */
 int gidsetsize;
-int grouplist[];
+gid_t grouplist[];
 { int result;
 
   ENTER_CRITICAL;
@@@@ -513,20 +504,6 @@@@
 }
 */
 
-int getpeername(s, name, namelen)   /* ok */
-int s;
-struct sockaddr *name;
-int *namelen;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_WRITABLE(name);
-  MAKE_WRITABLE(namelen);
-  result = syscall(SYS_getpeername, s, name, namelen);
-  EXIT_CRITICAL;
-  return result;
-}
-
 int getrlimit(resource, rlp)   /* ok */
 int resource;
 struct rlimit *rlp;
@@@@ -551,24 +528,10 @@@@
   return result;
 }
 
-int getsockname(s, name, namelen)   /* ok */
-int s;
-struct sockaddr *name;
-int *namelen;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_WRITABLE(name);
-  MAKE_WRITABLE(namelen);
-  result = syscall(SYS_getsockname, s, name, namelen);
-  EXIT_CRITICAL;
-  return result;
-}
-
 int getsockopt(s, level, optname, optval, optlen)   /* ok */
 int s, level, optname;
 void *optval;
-int *optlen;
+SOCKLEN_T *optlen;
 { int result;
 
   ENTER_CRITICAL;
@@@@ -629,9 +592,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;
+const char *name1;
+const char *name2;
 { int result;
 
   ENTER_CRITICAL;
@@@@ -643,7 +621,7 @@@@
 }
 
 int lstat(path, buf)   /* ok */
-char *path;
+const char *path;
 struct stat *buf;
 { int result;
 
@@@@ -656,7 +634,7 @@@@
 }
 
 int mkdir(path, mode)   /* ok */
-char *path;
+const char *path;
 mode_t mode;
 { int result;
 
@@@@ -667,8 +645,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;
@@@@ -680,13 +670,51 @@@@
   return result;
 }
 
-/* quite different ...
-int mount(special, name, rwflag, type, options)
-char *special;
-char *name;
-int rwflag, type;
-char *options;
-*/
+#if __FreeBSD_version >= 300001		/* New form of mount(2) */
+int
+mount(type, dir, flags, data)
+  const char *type;
+  const char *dir;
+  int flags;
+  void *data;
+{ int result;
+  struct ufs_args *u_data;
+  struct mfs_args *m_data;
+  struct nfs_args *n_data;
+
+  ENTER_CRITICAL;
+  MAKE_READABLE(type);
+  MAKE_READABLE(dir);
+  if (strcmp(type, "ufs") == 0) {
+    u_data = (struct ufs_args*) data;
+    MAKE_READABLE(u_data);
+    MAKE_READABLE(u_data->fspec);
+    result = syscall(SYS_mount, type, dir, flags, data);
+  } else if (strcmp(type, "mfs") == 0) {
+    m_data = (struct mfs_args*) data;
+    MAKE_READABLE(m_data);
+    MAKE_READABLE(m_data->fspec);
+    result = syscall(SYS_mount, type, dir, flags, data);
+  } else if (strcmp(type, "nfs") == 0) {
+    n_data = (struct nfs_args*) data;
+    MAKE_READABLE(n_data);
+    MAKE_READABLE(n_data->addr); 
+    MAKE_READABLE(n_data->fh);
+    MAKE_READABLE(n_data->hostname);
+    result = syscall(SYS_mount, type, dir, flags, data);
+  } else {	/* Not anything we recognize. */
+    MAKE_READABLE(data);
+    result = syscall(SYS_mount, type, dir, flags, data);
+  }
+  EXIT_CRITICAL;
+  if (result != -1) {
+    result = 0;
+  }
+  return result;
+}
+
+#else /* __FreeBSD_version >= 300001 */
+
 int mount(type, dir, flags, data)
 int type;
 const char *dir;
@@@@ -723,6 +751,7 @@@@
   }
   return result;
 }
+#endif /* __FreeBSD_version >= 300001 */
 
 int msgctl(msqid, cmd, buf)   /* ok */
 int msqid, cmd;
@@@@ -793,9 +822,13 @@@@
 }
 
 int quotactl(path, cmd, uid, addr)   /* ok */
-const char *path;
-int cmd, uid;
-char *addr;
+  const char *path;
+  int cmd, uid;
+#if __FreeBSD_version >= 400002
+  void *addr;
+#else
+  char *addr;
+#endif
 { int result;
 
   ENTER_CRITICAL;
@@@@ -821,21 +854,8 @@@@
   return result;
 }
 
-int read(d, buf, nbytes)   /* ok */
-int d;
-char *buf;
-size_t nbytes;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_WRITABLE(buf);
-  result = syscall(SYS_read, d, buf, nbytes);
-  EXIT_CRITICAL;
-  return result;
-}
-
 int readlink(path, buf, bufsiz)   /* ok */
-char *path;
+const char *path;
 char *buf;
 int bufsiz;
 { int result;
@@@@ -865,46 +885,6 @@@@
   return result;
 }
 
-int recv(s, buf, len, flags)   /* ok */
-int s;
-void *buf;
-#if __FreeBSD__ >=2
-size_t len;
-#else
-int len;
-#endif
-int flags;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_WRITABLE(buf);
-  result = syscall(SYS_recvfrom, s, buf, len, flags, NULL, 0);
-  EXIT_CRITICAL;
-  return result;
-}
-
-int recvfrom(s, buf, len, flags, from, fromlen)   /* ok */
-int s;
-void *buf;
-#if __FreeBSD__ >=2
-size_t len;
-#else
-int len;
-#endif
-int flags;
-struct sockaddr *from;
-int *fromlen;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_WRITABLE(buf);
-  MAKE_WRITABLE(from);
-  MAKE_WRITABLE(fromlen);
-  result = syscall(SYS_recvfrom, s, buf, len, flags, from, fromlen);
-  EXIT_CRITICAL;
-  return result;
-}
-
 int recvmsg(s, msg, flags)   /* ok */
 int s;
 struct msghdr msg[];
@@@@ -940,7 +920,7 @@@@
 }
 
 int rmdir(path)   /* ok */
-char *path;
+const char *path;
 { int result;
 
   ENTER_CRITICAL;
@@@@ -950,44 +930,42 @@@@
   return result;
 }
 
-int select(nfds, readfds, writefds, exceptfds, timeout)   /* ok */
-int nfds;
-fd_set *readfds;
-fd_set *writefds;
-fd_set *exceptfds;
-struct timeval *timeout;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_WRITABLE(readfds);
-  MAKE_WRITABLE(writefds);
-  MAKE_WRITABLE(exceptfds);
-  MAKE_READABLE(timeout);
-  result = syscall(SYS_select, nfds, readfds, writefds, exceptfds, timeout);
-  EXIT_CRITICAL;
-  return result;
-}
+int
+#if (227002 <= __FreeBSD_version && __FreeBSD_version < 300000) || \
+  __FreeBSD_version >= 300002
+semctl(int semid, int semnum, int cmd, ...)
+#else
+semctl(int semid, int semnum, int cmd, union semun arg)
+#endif
+{
+  int result;
+#if (227002 <= __FreeBSD_version && __FreeBSD_version < 300000) || \
+  __FreeBSD_version >= 300002
+  union semun arg;
+  va_list ap;
 
-int semctl(semid, semnum, cmd, arg)   /* ok ? */
-int semid, cmd;
-int semnum;
-union semun arg;
-{ int result;
+  va_start(ap, cmd);
+  arg = va_arg(ap, union semun);
+  va_end(ap);
+#endif
 
   ENTER_CRITICAL;
   switch (cmd) {
-  case GETNCNT:
-  case GETPID:
-  case GETVAL:
-  case GETALL:
-  case GETZCNT:
+
+  case IPC_SET:
     MAKE_READABLE(arg.buf);
     break;
+
   case SETALL:
-  case SETVAL:
+    MAKE_READABLE(arg.array);
+    break;
+
+  case IPC_STAT:
     MAKE_WRITABLE(arg.buf);
     break;
-  default:
+
+  case GETALL:
+    MAKE_WRITABLE(arg.array);
     break;
   }
   result = syscall(SYS_semsys, 0, semid, semnum, cmd, arg);
@@@@ -1012,24 +990,6 @@@@
   return result;
 }
 
-int send(s, msg, len, flags)   /* ok */
-int s;
-const void *msg;
-#if __FreeBSD__ >=2
-size_t len;
-#else
-int len;
-#endif
-int flags;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_READABLE(msg);
-  result = syscall(SYS_sendto, s, msg, len, flags, NULL, 0);
-  EXIT_CRITICAL;
-  return result;
-}
-
 int sendmsg(s, msg, flags)   /* ok */
 int s;
 const struct msghdr msg[];
@@@@ -1051,29 +1011,8 @@@@
   return result;
 }
 
-int sendto(s, msg, len, flags, to, tolen)   /* ok */
-int s;
-const void *msg;
-#if __FreeBSD__ >=2
-size_t len;
-#else
-int len;
-#endif
-int flags;
-const struct sockaddr *to;
-int tolen;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_READABLE(msg);
-  MAKE_READABLE(to);
-  result = syscall(SYS_sendto, s, msg, len, flags, to, tolen);
-  EXIT_CRITICAL;
-  return result;
-}
-
 int setdomainname(name, namelen)   /* ok */
-char *name;
+const char *name;
 int namelen;
 { int result;
 
@@@@ -1086,7 +1025,7 @@@@
 
 int setgroups(ngroups, gidset)   /* ok */
 int ngroups;
-int *gidset;
+const gid_t *gidset;
 { int result;
 
   ENTER_CRITICAL;
@@@@ -1097,7 +1036,7 @@@@
 }
 
 int sethostname(name, namelen)   /* ok */
-char *name;
+const char *name;
 int namelen;
 { int result;
 #if __FreeBSD__ >= 2
@@@@ -1168,7 +1107,7 @@@@
 int setsockopt(s, level, optname, optval, optlen)   /* ok */
 int s, level, optname;
 const void *optval;
-int optlen;
+SOCKLEN_T optlen;
 { int result;
 
   ENTER_CRITICAL;
@@@@ -1213,20 +1152,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 +1178,6 @@@@
   EXIT_CRITICAL;
   return result;
 }
-#else
-int sigstack(ss, oss)   /* ok */
-const struct sigstack *ss;
-struct sigstack *oss;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_READABLE(ss);
-  MAKE_WRITABLE(oss);
-  result = syscall(SYS_sigstack, ss, oss);
-  EXIT_CRITICAL;
-  return result;
-}
-#endif
 
 int socketpair(d, type, protocol, sv)   /* ok */
 int d, type, protocol;
@@@@ -1267,7 +1192,7 @@@@
 }
 
 int stat(path, buf)   /* ok */
-char *path;
+const char *path;
 struct stat *buf;
 { int result;
 
@@@@ -1280,7 +1205,7 @@@@
 }
 
 int swapon(special)   /* ok */
-char *special;
+const char *special;
 { int result;
 
   ENTER_CRITICAL;
@@@@ -1291,8 +1216,8 @@@@
 }
 
 int symlink(name1, name2)   /* ok */
-char *name1;
-char *name2;
+const char *name1;
+const char *name2;
 { int result;
 
   ENTER_CRITICAL;
@@@@ -1304,14 +1229,14 @@@@
 }
 
 int truncate(path, length)   /* ok */
-char *path;
-long length;
+const char *path;
+off_t length;
 { int result;
-  off_t len = (off_t)length;
 
   ENTER_CRITICAL;
   MAKE_READABLE(path);
-  result = syscall(SYS_truncate, path, len);
+  /* The casts below pad "path" out to a 64-bit value as required. */
+  result = __syscall(SYS_truncate, (u_quad_t) (u_int) path, length);
   EXIT_CRITICAL;
   return result;
 }
@@@@ -1328,7 +1253,7 @@@@
 }
 
 int unlink(path)   /* ok */
-char *path;
+const char *path;
 { int result;
 
   ENTER_CRITICAL;
@@@@ -1414,19 +1339,6 @@@@
   ENTER_CRITICAL;
   MAKE_WRITABLE(status);
   result = syscall(SYS_wait4, pid, status, options, NULL);
-  EXIT_CRITICAL;
-  return result;
-}
-
-int write(fd, buf, nbytes)   /* ok */
-int fd;
-char *buf;
-int nbytes;
-{ int result;
-
-  ENTER_CRITICAL;
-  MAKE_READABLE(buf);
-  result = syscall(SYS_write, fd, buf, nbytes);
   EXIT_CRITICAL;
   return result;
 }
@


1.13
log
@Fix breakage caused by the recent socklen_t changes in -current.
Modula-3 and CVSup build and work again under -current now.

PR:		ports/15595
@
text
@@


1.12
log
@Update the wrapper for quotactl() to reflect a change in its
prototype in 4.0-current on 5 March 1999.  The value of
__FreeBSD_version wasn't bumped until 13 March, so the port is
broken for versions of -current between those dates.
@
text
@a0 8
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 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.

d2 1
a2 1
+++ m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c	Sun Mar 14 05:43:53 1999
d13 1
a13 1
@@@@ -89,9 +90,21 @@@@
d32 6
d41 1
a41 1
@@@@ -110,22 +123,8 @@@@
d65 1
a65 1
@@@@ -137,7 +136,7 @@@@
d74 1
a74 1
@@@@ -228,19 +227,6 @@@@
d94 1
a94 1
@@@@ -268,7 +254,7 @@@@
d103 1
a103 1
@@@@ -278,8 +264,20 @@@@
d125 1
a125 1
@@@@ -291,7 +289,7 @@@@
d134 1
a134 1
@@@@ -304,7 +302,7 @@@@
d143 1
a143 1
@@@@ -314,19 +312,6 @@@@
d163 1
a163 1
@@@@ -356,8 +341,8 @@@@
d174 1
a174 1
@@@@ -473,7 +458,7 @@@@
d183 1
a183 1
@@@@ -513,20 +498,6 @@@@
d204 1
a204 1
@@@@ -551,20 +522,6 @@@@
d225 6
a230 1
@@@@ -629,9 +586,24 @@@@
d257 1
a257 1
@@@@ -643,7 +615,7 @@@@
d266 1
a266 1
@@@@ -656,7 +628,7 @@@@
d275 1
a275 1
@@@@ -667,8 +639,20 @@@@
d297 1
a297 1
@@@@ -680,13 +664,51 @@@@
d356 1
a356 1
@@@@ -723,6 +745,7 @@@@
d364 1
a364 1
@@@@ -793,9 +816,13 @@@@
d381 1
a381 1
@@@@ -821,21 +848,8 @@@@
d404 1
a404 1
@@@@ -865,46 +879,6 @@@@
d451 1
a451 1
@@@@ -940,7 +914,7 @@@@
d460 1
a460 1
@@@@ -950,44 +924,42 @@@@
d532 1
a532 1
@@@@ -1012,24 +984,6 @@@@
d557 1
a557 1
@@@@ -1051,29 +1005,8 @@@@
d588 1
a588 1
@@@@ -1086,7 +1019,7 @@@@
d597 1
a597 1
@@@@ -1097,7 +1030,7 @@@@
d606 10
a615 1
@@@@ -1213,20 +1146,20 @@@@
d643 1
a643 1
@@@@ -1239,20 +1172,6 @@@@
d664 1
a664 1
@@@@ -1267,7 +1186,7 @@@@
d673 1
a673 1
@@@@ -1280,7 +1199,7 @@@@
d682 1
a682 1
@@@@ -1291,8 +1210,8 @@@@
d693 1
a693 1
@@@@ -1304,14 +1223,14 @@@@
d712 1
a712 1
@@@@ -1328,7 +1247,7 @@@@
d721 1
a721 1
@@@@ -1414,19 +1333,6 @@@@
@


1.11
log
@Fix building this port under recent versions of -stable.  My
previous fix for dealing with the semctl() interface change was
incomplete.
@
text
@d10 1
a10 1
+++ m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c	Mon Oct  5 19:56:27 1998
d361 18
a378 1
@@@@ -821,21 +844,8 @@@@
d401 1
a401 1
@@@@ -865,46 +875,6 @@@@
d448 1
a448 1
@@@@ -940,7 +910,7 @@@@
d457 1
a457 1
@@@@ -950,44 +920,42 @@@@
d529 1
a529 1
@@@@ -1012,24 +980,6 @@@@
d554 1
a554 1
@@@@ -1051,29 +1001,8 @@@@
d585 1
a585 1
@@@@ -1086,7 +1015,7 @@@@
d594 1
a594 1
@@@@ -1097,7 +1026,7 @@@@
d603 1
a603 1
@@@@ -1213,20 +1142,20 @@@@
d631 1
a631 1
@@@@ -1239,20 +1168,6 @@@@
d652 1
a652 1
@@@@ -1267,7 +1182,7 @@@@
d661 1
a661 1
@@@@ -1280,7 +1195,7 @@@@
d670 1
a670 1
@@@@ -1291,8 +1206,8 @@@@
d681 1
a681 1
@@@@ -1304,14 +1219,14 @@@@
d700 1
a700 1
@@@@ -1328,7 +1243,7 @@@@
d709 1
a709 1
@@@@ -1414,19 +1329,6 @@@@
@


1.10
log
@Fix breakage caused by a recent change to <sys/sem.h> in -stable.
Unfortunately, this depends on a bump of __FreeBSD_version which
came 12 days too late.  Thus there is a range of -stable versions
from 7 September 1998 to 19 September 1998 on which this port won't
build.
@
text
@d10 1
a10 1
+++ m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c	Sat Sep 19 10:35:49 1998
d440 1
a440 1
@@@@ -950,44 +920,41 @@@@
d470 2
a471 1
+#if __FreeBSD_version >= 300002
d512 1
a512 1
@@@@ -1012,24 +979,6 @@@@
d537 1
a537 1
@@@@ -1051,29 +1000,8 @@@@
d568 1
a568 1
@@@@ -1086,7 +1014,7 @@@@
d577 1
a577 1
@@@@ -1097,7 +1025,7 @@@@
d586 1
a586 1
@@@@ -1213,20 +1141,20 @@@@
d614 1
a614 1
@@@@ -1239,20 +1167,6 @@@@
d635 1
a635 1
@@@@ -1267,7 +1181,7 @@@@
d644 1
a644 1
@@@@ -1280,7 +1194,7 @@@@
d653 1
a653 1
@@@@ -1291,8 +1205,8 @@@@
d664 1
a664 1
@@@@ -1304,14 +1218,14 @@@@
d683 1
a683 1
@@@@ -1328,7 +1242,7 @@@@
d692 1
a692 1
@@@@ -1414,19 +1328,6 @@@@
@


1.9
log
@Fix the semctl() wrapper so that it will compile on -current systems
again.  The prototype was changed in revision 1.14 of "src/sys/sys/sem.h".
In order to make this work on older systems too, I have incremented
__FreeBSD_version and `ifdef'ed based on that.  Unfortunately,
there was a 3-day gap between when the semctl() interface changed
(May 30) and when I bumped __FreeBSD_version (June 2).  FreeBSD-current
systems from that date range will still have problems building this
port.
@
text
@d10 1
a10 1
+++ m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c	Tue Jun  2 14:22:48 1998
d440 1
a440 1
@@@@ -950,44 +920,40 @@@@
d462 2
a463 1
+#if __FreeBSD_version >= 300002
d511 1
a511 1
@@@@ -1012,24 +978,6 @@@@
d536 1
a536 1
@@@@ -1051,29 +999,8 @@@@
d567 1
a567 1
@@@@ -1086,7 +1013,7 @@@@
d576 1
a576 1
@@@@ -1097,7 +1024,7 @@@@
d585 1
a585 1
@@@@ -1213,20 +1140,20 @@@@
d613 1
a613 1
@@@@ -1239,20 +1166,6 @@@@
d634 1
a634 1
@@@@ -1267,7 +1180,7 @@@@
d643 1
a643 1
@@@@ -1280,7 +1193,7 @@@@
d652 1
a652 1
@@@@ -1291,8 +1204,8 @@@@
d663 1
a663 1
@@@@ -1304,14 +1217,14 @@@@
d682 1
a682 1
@@@@ -1328,7 +1241,7 @@@@
d691 1
a691 1
@@@@ -1414,19 +1327,6 @@@@
@


1.8
log
@Fix all the paths in context diff headers and remove the Index
lines, since the WORTHLESS, BROKEN new version of patch ignores
them.
@
text
@d10 1
a10 1
+++ m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c	Wed Sep 24 08:39:00 1997
d440 1
a440 1
@@@@ -950,24 +920,6 @@@@
d461 50
a510 5
-
 int semctl(semid, semnum, cmd, arg)   /* ok ? */
 int semid, cmd;
 int semnum;
@@@@ -1012,24 +964,6 @@@@
d535 1
a535 1
@@@@ -1051,29 +985,8 @@@@
d566 1
a566 1
@@@@ -1086,7 +999,7 @@@@
d575 1
a575 1
@@@@ -1097,7 +1010,7 @@@@
d584 1
a584 1
@@@@ -1213,20 +1126,20 @@@@
d612 1
a612 1
@@@@ -1239,20 +1152,6 @@@@
d633 1
a633 1
@@@@ -1267,7 +1166,7 @@@@
d642 1
a642 1
@@@@ -1280,7 +1179,7 @@@@
d651 1
a651 1
@@@@ -1291,8 +1190,8 @@@@
d662 1
a662 1
@@@@ -1304,14 +1203,14 @@@@
d681 1
a681 1
@@@@ -1328,7 +1227,7 @@@@
d690 1
a690 1
@@@@ -1414,19 +1313,6 @@@@
@


1.7
log
@Fix "RTHeapDepC.c" so that it compiles under the recently changed
prototype for mount(2).
@
text
@d9 2
a10 3
Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
--- RTHeapDepC.c.orig	Sat Mar 23 14:52:21 1996
+++ RTHeapDepC.c	Wed Sep 24 08:39:00 1997
@


1.6
log
@Fix a screwed up patch that broke things badly.
@
text
@d11 12
a22 2
+++ RTHeapDepC.c	Thu Jul 10 22:41:39 1997
@@@@ -89,9 +89,20 @@@@
d38 1
d44 1
a44 1
@@@@ -110,22 +121,8 @@@@
d68 1
a68 1
@@@@ -137,7 +134,7 @@@@
d77 1
a77 1
@@@@ -228,19 +225,6 @@@@
d97 1
a97 1
@@@@ -268,7 +252,7 @@@@
d106 1
a106 1
@@@@ -278,8 +262,20 @@@@
d128 1
a128 1
@@@@ -291,7 +287,7 @@@@
d137 1
a137 1
@@@@ -304,7 +300,7 @@@@
d146 1
a146 1
@@@@ -314,19 +310,6 @@@@
d166 1
a166 1
@@@@ -356,8 +339,8 @@@@
d177 1
a177 1
@@@@ -473,7 +456,7 @@@@
d186 1
a186 1
@@@@ -513,20 +496,6 @@@@
d207 1
a207 1
@@@@ -551,20 +520,6 @@@@
d228 1
a228 1
@@@@ -629,9 +584,24 @@@@
d255 1
a255 1
@@@@ -643,7 +613,7 @@@@
d264 1
a264 1
@@@@ -656,7 +626,7 @@@@
d273 1
a273 1
@@@@ -667,8 +637,20 @@@@
d295 68
a362 1
@@@@ -821,21 +803,8 @@@@
d385 1
a385 1
@@@@ -865,46 +834,6 @@@@
d432 1
a432 1
@@@@ -940,7 +869,7 @@@@
d441 1
a441 1
@@@@ -950,24 +879,6 @@@@
d466 1
a466 1
@@@@ -1012,24 +923,6 @@@@
d491 1
a491 1
@@@@ -1051,29 +944,8 @@@@
d522 1
a522 1
@@@@ -1086,7 +958,7 @@@@
d531 1
a531 1
@@@@ -1097,7 +969,7 @@@@
d540 1
a540 1
@@@@ -1213,20 +1085,20 @@@@
d568 1
a568 1
@@@@ -1239,20 +1111,6 @@@@
d589 1
a589 1
@@@@ -1267,7 +1125,7 @@@@
d598 1
a598 1
@@@@ -1280,7 +1138,7 @@@@
d607 1
a607 1
@@@@ -1291,8 +1149,8 @@@@
d618 1
a618 1
@@@@ -1304,14 +1162,14 @@@@
d637 1
a637 1
@@@@ -1328,7 +1186,7 @@@@
d646 1
a646 1
@@@@ -1414,19 +1272,6 @@@@
@


1.5
log
@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.
@
text
@d11 1
a11 1
+++ RTHeapDepC.c	Thu Jul 10 18:16:04 1997
d490 1
a490 1
@@@@ -1239,20 +1111,42 @@@@
d498 3
a500 6
+
+int sigpending(set)
+sigset_t *set;
 { int result;
 
   ENTER_CRITICAL;
d504 3
a506 30
+  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;
 }
d511 1
a511 1
@@@@ -1267,7 +1161,7 @@@@
d520 1
a520 1
@@@@ -1280,7 +1174,7 @@@@
d529 1
a529 1
@@@@ -1291,8 +1185,8 @@@@
d540 1
a540 1
@@@@ -1304,14 +1198,14 @@@@
d559 1
a559 1
@@@@ -1328,7 +1222,7 @@@@
d568 1
a568 1
@@@@ -1414,19 +1308,6 @@@@
@


1.4
log
@Fix a build failure caused by a prototype mismatch.  Correct
numerous incorrect argument declarations.  Make the wrapper for
ftruncate() do the right thing with respect to 64-bit argument
alignment.
@
text
@d4 1
a4 1
Add a wrapper for the "chflags" system call.
d11 6
a16 2
+++ RTHeapDepC.c	Wed Apr 23 10:01:01 1997
@@@@ -92,6 +92,16 @@@@
d33 1
a33 1
@@@@ -110,22 +120,8 @@@@
d57 1
a57 1
@@@@ -137,7 +133,7 @@@@
d66 1
a66 1
@@@@ -228,19 +224,6 @@@@
d86 1
a86 1
@@@@ -268,7 +251,7 @@@@
d95 1
a95 1
@@@@ -278,6 +261,18 @@@@
d112 2
a113 1
 char *path;
d115 3
a117 1
@@@@ -291,7 +286,7 @@@@
d126 1
a126 1
@@@@ -304,7 +299,7 @@@@
d135 1
a135 1
@@@@ -314,19 +309,6 @@@@
d155 1
a155 1
@@@@ -356,8 +338,8 @@@@
d166 1
a166 1
@@@@ -473,7 +455,7 @@@@
d175 1
a175 1
@@@@ -513,20 +495,6 @@@@
d196 1
a196 1
@@@@ -551,20 +519,6 @@@@
d217 2
a218 1
@@@@ -630,8 +584,8 @@@@
d221 15
d244 10
a253 1
@@@@ -668,7 +622,7 @@@@
d256 22
d284 1
a284 1
@@@@ -821,21 +775,8 @@@@
d307 1
a307 1
@@@@ -865,46 +806,6 @@@@
d354 1
a354 1
@@@@ -940,7 +841,7 @@@@
d363 1
a363 1
@@@@ -950,24 +851,6 @@@@
d388 1
a388 1
@@@@ -1012,24 +895,6 @@@@
d413 1
a413 1
@@@@ -1051,29 +916,8 @@@@
d444 1
a444 1
@@@@ -1086,7 +930,7 @@@@
d453 1
a453 1
@@@@ -1097,7 +941,7 @@@@
d462 89
a550 1
@@@@ -1280,7 +1124,7 @@@@
d559 1
a559 1
@@@@ -1291,8 +1135,8 @@@@
d570 1
a570 1
@@@@ -1304,14 +1148,14 @@@@
d589 1
a589 1
@@@@ -1328,7 +1172,7 @@@@
d598 1
a598 1
@@@@ -1414,19 +1258,6 @@@@
@


1.3
log
@Add a wrapper for the "chflags" system call.
@
text
@d5 3
d11 2
a12 2
+++ RTHeapDepC.c	Wed Mar 26 13:21:39 1997
@@@@ -92,6 +92,14 @@@@
d24 2
d29 1
a29 1
@@@@ -110,20 +118,6 @@@@
d48 2
a49 1
 char *path;
d51 12
a62 1
@@@@ -228,19 +222,6 @@@@
d82 10
a91 1
@@@@ -278,6 +259,18 @@@@
d110 19
a128 1
@@@@ -314,19 +307,6 @@@@
d148 1
a148 1
@@@@ -356,8 +336,8 @@@@
d159 10
a168 1
@@@@ -513,20 +493,6 @@@@
d189 1
a189 1
@@@@ -551,20 +517,6 @@@@
d210 21
a230 1
@@@@ -821,19 +773,6 @@@@
d248 2
a249 1
 char *path;
d251 3
a253 1
@@@@ -865,46 +804,6 @@@@
d300 10
a309 1
@@@@ -950,24 +849,6 @@@@
d334 1
a334 1
@@@@ -1012,24 +893,6 @@@@
d359 1
a359 1
@@@@ -1051,27 +914,6 @@@@
d385 2
a386 1
 char *name;
d388 69
a456 1
@@@@ -1414,19 +1256,6 @@@@
@


1.2
log
@Fix an include file problem that prevented RTHeapDepC.c from
compiling on post-lite2-merge systems.
@
text
@d4 1
d8 1
a8 1
+++ RTHeapDepC.c	Wed Mar 26 10:19:53 1997
d65 20
a84 1
@@@@ -314,19 +295,6 @@@@
d104 1
a104 1
@@@@ -356,8 +324,8 @@@@
d115 1
a115 1
@@@@ -513,20 +481,6 @@@@
d136 1
a136 1
@@@@ -551,20 +505,6 @@@@
d157 1
a157 1
@@@@ -821,19 +761,6 @@@@
d177 1
a177 1
@@@@ -865,46 +792,6 @@@@
d224 1
a224 1
@@@@ -950,24 +837,6 @@@@
d249 1
a249 1
@@@@ -1012,24 +881,6 @@@@
d274 1
a274 1
@@@@ -1051,27 +902,6 @@@@
d302 1
a302 1
@@@@ -1414,19 +1244,6 @@@@
@


1.1
log
@Initial revision
@
text
@d2 2
a3 1
Also, move network related wrappers to separate files, for SOCKS support.
d7 17
a23 2
+++ RTHeapDepC.c	Tue Oct  8 14:31:15 1996
@@@@ -110,20 +110,6 @@@@
d44 1
a44 1
@@@@ -228,19 +214,6 @@@@
d64 1
a64 1
@@@@ -314,19 +287,6 @@@@
d84 1
a84 1
@@@@ -356,8 +316,8 @@@@
d95 1
a95 1
@@@@ -513,20 +473,6 @@@@
d116 1
a116 1
@@@@ -551,20 +497,6 @@@@
d137 1
a137 1
@@@@ -821,19 +753,6 @@@@
d157 1
a157 1
@@@@ -865,46 +784,6 @@@@
d204 1
a204 1
@@@@ -950,24 +829,6 @@@@
d229 1
a229 1
@@@@ -1012,24 +873,6 @@@@
d254 1
a254 1
@@@@ -1051,27 +894,6 @@@@
d282 1
a282 1
@@@@ -1414,19 +1236,6 @@@@
@


1.1.1.1
log
@Split the Modula-3 port into two pieces, creating a new port
"modula-3-lib".  It installs only the shared libraries needed for
executing Modula-3 programs.  This saves a lot of disk space for
people who need to run Modula-3 programs but don't need to build
them.  The original "modula-3" port now depends on this one, and
uses it to install the compiler and the rest of the development
system.

Also, everything is now built with optimization.  I have been
testing this for at least a month, and haven't seen any problems
from it.  It makes the libraries and executables substantially
smaller.

This new port also includes some hooks that will make SOCKS support
possible in the near future.
@
text
@@
