Add some patches for the clean install.

This commit is contained in:
Yukihiro Nakai 1999-10-22 09:35:49 +00:00
parent 114967e48f
commit f27da5c832
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=22581
8 changed files with 183 additions and 30 deletions

View file

@ -15,8 +15,6 @@ MAINTAINER= ports@FreeBSD.org
LIB_DEPENDS= GL.14:${PORTSDIR}/graphics/Mesa3
BROKEN= install
USE_GMAKE= yes
USE_X_PREFIX= yes

View file

@ -1,8 +1,6 @@
*** src/common/utils/unixsocket.C.orig Mon Jun 23 02:12:28 1997
--- src/common/utils/unixsocket.C Mon Jun 23 02:17:04 1997
***************
*** 67,72 ****
--- 67,75 ----
--- src/common/utils/unixsocket.C.orig Fri Feb 21 21:41:25 1997
+++ src/common/utils/unixsocket.C Wed Oct 20 19:35:42 1999
@@ -67,6 +67,9 @@
#if defined(BSDI)
# define DONT_HAVE_SENDFD
#endif
@ -12,3 +10,68 @@
#if ! (defined HAVE_SENDFD || defined DONT_HAVE_SENDFD)
#error SEND_FD
@@ -110,19 +113,29 @@
sock = ::socket (AF_UNIX, SOCK_STREAM, 0) ;
if (sock < 0) {
DEBUGNL ("UNIXSocket::connect(): could not create socket") ;
+#ifndef __FreeBSD__
set_errno_(::errno) ;
+#endif
perror_("UNIXSocket::connect(): ::socket()") ;
return false ;
}
if (::connect (sock, (struct sockaddr*)&addr, addrlen) < 0) {
+#ifdef __FreeBSD__
+ if (errno == ECONNREFUSED && retries > 0) {
+#else
if (::errno == ECONNREFUSED && retries > 0) {
+#endif
// try again since peer's backlog may just be full
::close (sock) ;
::sleep (1) ; // ++++
continue ;
} else {
DEBUGNL ("UNIXSocket::connect(): cannot connect") ;
+#ifdef __FreeBSD__
+ set_errno_(errno) ;
+#else
set_errno_(::errno) ;
+#endif
perror_("UNIXSocket::connect(): ::connect()") ;
::close (sock) ;
return false ;
@@ -143,7 +156,11 @@
int sock = ::socket (AF_UNIX, SOCK_STREAM, 0) ;
if (sock < 0) {
DEBUGNL ("UNIXSocket::listen(): could not create socket") ;
+#ifdef __FreeBSD__
+ set_errno_(errno) ;
+#else
set_errno_(::errno) ;
+#endif
perror_("UNIXSocket::listen(): ::socket()") ;
return false ;
}
@@ -160,14 +177,22 @@
// systems have 2 chars (len and family) instead.
if (::bind (sock, (struct sockaddr*)&addr, 2 + pathlen) < 0) {
DEBUGNL ("UNIXSocket::listen(): ::bind() error") ;
+#ifdef __FreeBSD__
+ set_errno_(errno) ;
+#else
set_errno_(::errno) ;
+#endif
perror_("UNIXSocket::listen(): ::bind()") ;
::close (sock) ;
return false ;
}
if (::listen (sock, SOMAXCONN) < 0) {
DEBUGNL ("UNIXSocket::listen(): ::listen() error") ;
+#ifdef __FreeBSD__
+ set_errno_(errno) ;
+#else
set_errno_(::errno) ;
+#endif
perror_("UNIXSocket::listen(): ::listen()") ;
::close (sock);
return false ;

View file

@ -1,12 +1,10 @@
*** src/common/OS/directory.C.orig Mon Jun 23 02:29:52 1997
--- src/common/OS/directory.C Mon Jun 23 02:31:27 1997
***************
*** 32,37 ****
--- 32,38 ----
--- src/common/OS/directory.C.orig Thu Jan 30 18:58:15 1997
+++ src/common/OS/directory.C Fri Oct 22 14:58:52 1999
@@ -32,6 +32,7 @@
* includes <sys/dir.h>, which is silly because <sys/dir.h>
* needs <sys/types.h>.
*/
+ #include <machine/types.h>
+#include <sys/types.h>
#include "types.h"
#ifdef apollo
#include <sys/dir.h>

View file

@ -1,5 +1,5 @@
--- src/harmony/scene/mesacontext.C.orig Thu Apr 23 16:08:17 1998
+++ src/harmony/scene/mesacontext.C Thu Apr 23 16:08:47 1998
--- src/harmony/scene/mesacontext.C.orig Wed Feb 26 02:06:48 1997
+++ src/harmony/scene/mesacontext.C Fri Oct 22 15:19:42 1999
@@ -95,8 +95,8 @@
#include <IV-X11/Xdefs.h> /* Display, Font of X11 */
@ -11,3 +11,11 @@
#include <IV-X11/Xundefs.h> /* get back to IV's names */
#include <iostream.h>
@@ -236,6 +236,7 @@
xdpy, &xvisinfo_, 1, // rgb mode
0, // no alpha planes (Mesa 2.0)
double_buffered_,
+ 0,
imgcontext, // ximage or pixmap
1, 0, 0, // depth buffer, no stencil, no accum (Mesa 2.0)
0 // level (Mesa 2.0)

23
www/vrweb/files/patch-ag Normal file
View file

@ -0,0 +1,23 @@
--- src/common/utils/socket.C.orig Wed Oct 20 19:23:22 1999
+++ src/common/utils/socket.C Wed Oct 20 19:36:04 1999
@@ -53,6 +53,8 @@
//
//
// </file>
+
+#include <stdio.h>
#include "socket.h"
#include "new.h"
@@ -186,7 +188,11 @@
#ifndef WIN32
int dupfd = ::dup (fd()) ;
if (dupfd < 0) {
+#ifdef __FreeBSD__
+ set_errno_(errno) ;
+#else
set_errno_(::errno) ;
+#endif
perror_("Socket::accept_(sockaddr&,int&): ::dup()") ;
return dupfd ;
}

26
www/vrweb/files/patch-ah Normal file
View file

@ -0,0 +1,26 @@
--- src/common/Dispatch/connect.C.orig Wed Oct 20 19:39:20 1999
+++ src/common/Dispatch/connect.C Wed Oct 20 19:41:38 1999
@@ -102,7 +102,11 @@
if ((iError=WSAGetLastError()) != WSAEWOULDBLOCK) {
cerr << "ConnectRequest::ConnectRequest(): ::connect() code:" << iError<<endl;
#else
+#ifdef __FreeBSD__
+ if (errno != EINPROGRESS) {
+#else
if (::errno != EINPROGRESS) {
+#endif
::perror ("ConnectRequest::ConnectRequest(): ::connect()") ;
#endif
HGSOCKCLOSE (socket_) ;
@@ -154,7 +158,11 @@
sockaddr_in that ;
int thatlen = sizeof (that) ;
if (::getpeername (fd, (sockaddr*)&that, &thatlen) < 0) {
+#ifdef __FreeBSD__
+ if (! (errno==ENOTCONN || errno==ECONNREFUSED))
+#else
if (! (::errno==ENOTCONN || ::errno==ECONNREFUSED))
+#endif
::perror ("ConnectRequest::outputReady(): ::getpeername()") ;
callback->connectError (a) ;
::close (fd) ;

14
www/vrweb/files/patch-ai Normal file
View file

@ -0,0 +1,14 @@
--- src/common/Dispatch/dispatcher.C.orig Wed Oct 20 19:42:05 1999
+++ src/common/Dispatch/dispatcher.C Wed Oct 20 19:42:42 1999
@@ -359,7 +359,11 @@
DEBUGNL ("Dispatcher::waitForChild()") ;
pid_t pid ;
int status ;
+#ifdef __FreeBSD__
+ while ((pid = ::waitpid (-1, &status, WNOHANG)) > 0 || (pid < 0 && errno == EINTR)) {
+#else
while ((pid = ::waitpid (-1, &status, WNOHANG)) > 0 || (pid < 0 && ::errno == EINTR)) {
+#endif
DEBUGNL ("Dispatcher::waitForChild(): pid: "<<pid) ;
DChildHandler lookup (pid) ;
int pos ;

23
www/vrweb/files/patch-aj Normal file
View file

@ -0,0 +1,23 @@
--- src/common/Dispatch/rpcbuf.C.orig Wed Oct 20 19:42:58 1999
+++ src/common/Dispatch/rpcbuf.C Wed Oct 20 19:44:12 1999
@@ -977,12 +977,20 @@
// jfasch 24 Apr 1995
int rpcbuf :: rpc_read (int fd, char* buf, int len) {
int nread ;
+#ifdef __FreeBSD__
+ while ((nread = ::read (fd, buf, len)) < 0 && errno == EINTR) ;
+#else
while ((nread = ::read (fd, buf, len)) < 0 && ::errno == EINTR) ;
+#endif
return nread ;
}
int rpcbuf :: rpc_write (int fd, const char* buf, int len) {
int nwritten ;
+#ifdef __FreeBSD__
+ while ((nwritten = ::write (fd, buf, len)) < 0 && errno == EINTR) ;
+#else
while ((nwritten = ::write (fd, buf, len)) < 0 && ::errno == EINTR) ;
+#endif
return nwritten ;
}
#endif