mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-04 22:33:27 +00:00
d5a92ea924
"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.
286 lines
5.6 KiB
Plaintext
286 lines
5.6 KiB
Plaintext
Fix a const-related compiler warning produced by the "execve" wrapper.
|
|
Also, move network related wrappers to separate files, for SOCKS support.
|
|
|
|
Index: m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c
|
|
--- RTHeapDepC.c.orig Sat Mar 23 14:52:21 1996
|
|
+++ RTHeapDepC.c Tue Oct 8 14:31:15 1996
|
|
@@ -110,20 +110,6 @@
|
|
/* 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;
|
|
int mode;
|
|
@@ -228,19 +214,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;
|
|
@@ -314,19 +287,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 +316,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;
|
|
}
|
|
@@ -513,20 +473,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,20 +497,6 @@
|
|
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;
|
|
@@ -821,19 +753,6 @@
|
|
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;
|
|
char *buf;
|
|
@@ -865,46 +784,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[];
|
|
@@ -950,24 +829,6 @@
|
|
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 semctl(semid, semnum, cmd, arg) /* ok ? */
|
|
int semid, cmd;
|
|
int semnum;
|
|
@@ -1012,24 +873,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,27 +894,6 @@
|
|
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;
|
|
int namelen;
|
|
@@ -1414,19 +1236,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;
|
|
}
|