rasmus          Sun Jan 21 09:26:44 2001 EDT

  Modified files:              
    /php4       configure.in 
    /php4/ext/mysql/libmysql    libmysql.c 
    /php4/ext/standard  basic_functions.c dns.c file.c filestat.c 
                        fsock.c ftp_fopen_wrapper.c http_fopen_wrapper.c 
                        mail.c syslog.c 
    /php4/main  fopen-wrappers.c network.c php_open_temporary_file.c 
  Log:
  @BeOS patch from [EMAIL PROTECTED] modified somewhat by Rasmus
  BeOS patch from [EMAIL PROTECTED] modified somewhat by Rasmus
  
  
Index: php4/configure.in
diff -u php4/configure.in:1.213 php4/configure.in:1.214
--- php4/configure.in:1.213     Wed Jan 17 04:32:45 2001
+++ php4/configure.in   Sun Jan 21 09:26:43 2001
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.213 2001/01/17 12:32:45 sas Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.214 2001/01/21 17:26:43 rasmus Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -106,6 +106,8 @@
     CPPFLAGS="$CPPFLAGS -traditional-cpp";;
 *bsdi*)
     BSD_MAKEFILE=yes;;
+*beos*)
+       LIBS="$LIBS -lbe -lroot"
 esac
 
 AM_PROG_CC_STDC
@@ -294,6 +296,7 @@
 stdlib.h \
 string.h \
 syslog.h \
+sysexits.h \
 sys/file.h \
 sys/mman.h \
 sys/resource.h \
@@ -301,6 +304,7 @@
 sys/socket.h \
 sys/statfs.h \
 sys/statvfs.h \
+sys/sysexits.h \
 sys/time.h \
 sys/types.h \
 sys/varargs.h \
@@ -360,6 +364,8 @@
 gcvt \
 getlogin \
 gethostbyaddr \
+getprotobyname \
+getprotobynumber \
 getrusage \
 gettimeofday \
 gmtime_r \
Index: php4/ext/mysql/libmysql/libmysql.c
diff -u php4/ext/mysql/libmysql/libmysql.c:1.5 php4/ext/mysql/libmysql/libmysql.c:1.6
--- php4/ext/mysql/libmysql/libmysql.c:1.5      Fri Oct 20 15:26:48 2000
+++ php4/ext/mysql/libmysql/libmysql.c  Sun Jan 21 09:26:43 2001
@@ -25,7 +25,9 @@
 #if !defined(MSDOS) && !defined(__WIN__)
 #include <sys/socket.h>
 #include <netinet/in.h>
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 #include <netdb.h>
 #ifdef HAVE_SELECT_H
 #  include <select.h>
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.299 
php4/ext/standard/basic_functions.c:1.300
--- php4/ext/standard/basic_functions.c:1.299   Wed Jan 17 12:37:48 2001
+++ php4/ext/standard/basic_functions.c Sun Jan 21 09:26:43 2001
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.299 2001/01/17 20:37:48 elixer Exp $ */
+/* $Id: basic_functions.c,v 1.300 2001/01/21 17:26:43 rasmus Exp $ */
 
 #include "php.h"
 #include "php_main.h"
@@ -34,7 +34,9 @@
 #include <time.h>
 #include <stdio.h>
 #include <netdb.h>
+#if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -233,13 +235,19 @@
        PHP_FE(mt_srand,                                                               
 NULL)
        PHP_FE(mt_getrandmax,                                                   NULL)
        PHP_FE(getservbyname, NULL)
+#if HAVE_GETSERVBYPORT
        PHP_FE(getservbyport, NULL)
+#endif
+#if HAVE_GETPROTOBYNAME
        PHP_FE(getprotobyname, NULL)
+#endif
+#if HAVE_GETPROTOBYNUMBER
        PHP_FE(getprotobynumber, NULL)
+#endif
        PHP_FE(gethostbyaddr,                                                   NULL)
        PHP_FE(gethostbyname,                                                   NULL)
        PHP_FE(gethostbynamel,                                                  NULL)
-#if !defined(PHP_WIN32)||HAVE_BINDLIB
+#if HAVE_BINDLIB && !(defined(__BEOS__)||defined(PHP_WIN32))
        PHP_FE(checkdnsrr,                                                             
 NULL)
        PHP_FE(getmxrr,                                                                
 second_and_third_args_force_ref)
 #else
@@ -429,7 +437,7 @@
        PHP_FALIAS(socket_set_timeout, warn_not_available,      NULL)
 #endif
        PHP_FE(socket_get_status,       NULL)
-#if !defined(PHP_WIN32) || defined(ZTS)
+#if (!defined(PHP_WIN32) && !defined(__BEOS__)) || defined(ZTS)
        PHP_FE(realpath,                        NULL)
 #else
        PHP_FALIAS(realpath,            warn_not_available,             NULL)
@@ -2196,6 +2204,7 @@
 
 /* {{{ proto string getservbyport(int port, string protocol)
    Returns service name associated with port. Protocol must be "tcp" or "udp". */
+#if HAVE_GETSERVBYPORT
 PHP_FUNCTION(getservbyport)
 {
        pval **port,**proto;
@@ -2214,11 +2223,13 @@
 
        RETURN_STRING(serv->s_name,1);
 }
+#endif
 /* }}} */
 
 
 /* {{{ proto int getprotobyname(string name)
    Returns protocol number associated with name as per /etc/protocols */
+#if HAVE_GETPROTOBYNAME
 PHP_FUNCTION(getprotobyname)
 {
        pval **name;
@@ -2240,11 +2251,13 @@
 
        RETURN_LONG(ent->p_proto);
 }
+#endif
 /* }}} */
 
 
 /* {{{ proto string getprotobynumber(int proto)
    Returns protocol name associated with protocol number proto */
+#if HAVE_GETPROTOBYNUMBER
 PHP_FUNCTION(getprotobynumber)
 {
        pval **proto;
@@ -2263,6 +2276,7 @@
 
        RETURN_STRING(ent->p_name,1);
 }
+#endif
 /* }}} */
 
 
Index: php4/ext/standard/dns.c
diff -u php4/ext/standard/dns.c:1.23 php4/ext/standard/dns.c:1.24
--- php4/ext/standard/dns.c:1.23        Mon Nov 27 05:31:21 2000
+++ php4/ext/standard/dns.c     Sun Jan 21 09:26:43 2001
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: dns.c,v 1.23 2000/11/27 13:31:21 sas Exp $ */
+/* $Id: dns.c,v 1.24 2001/01/21 17:26:43 rasmus Exp $ */
 
 #include "php.h"
 #if HAVE_SYS_SOCKET_H
@@ -28,11 +28,17 @@
 #define WINNT 1
 #endif
 /* located in www.php.net/extra/bindlib.zip */
+#if HAVE_ARPA_INET_H
 #include "arpa/inet.h"
+#endif
 #include "netdb.h"
+#if HAVE_ARPA_NAMESERV_H
 #include "arpa/nameser.h"
+#endif
+#if HAVE_RESOLV_H
 #include "resolv.h"
 #endif
+#endif
 #include <winsock.h>
 #else
 #include <netinet/in.h>
@@ -155,7 +161,7 @@
        return estrdup(inet_ntoa(in));
 }
 
-#if !defined(PHP_WIN32)||HAVE_BINDLIB
+#if HAVE_BINDLIB && !(defined(__BEOS__)||defined(PHP_WIN32))
 
 /* {{{ proto int checkdnsrr(string host [, string type])
    Check DNS records corresponding to a given Internet host name or IP address */
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.135 php4/ext/standard/file.c:1.136
--- php4/ext/standard/file.c:1.135      Sun Jan 14 06:11:38 2001
+++ php4/ext/standard/file.c    Sun Jan 21 09:26:43 2001
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: file.c,v 1.135 2001/01/14 14:11:38 thies Exp $ */
+/* $Id: file.c,v 1.136 2001/01/21 17:26:43 rasmus Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -50,8 +50,10 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
+#if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
+#endif
 #include "ext/standard/head.h"
 #include "safe_mode.h"
 #include "php_string.h"
@@ -1947,7 +1949,7 @@
 /* }}} */
 
 
-#if !defined(PHP_WIN32) || defined(ZTS)
+#if (!defined(PHP_WIN32) && !defined(__BEOS__)) || defined(ZTS)
 /* {{{ proto string realpath(string path)
    Return the resolved path */
 PHP_FUNCTION(realpath)
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.51 php4/ext/standard/filestat.c:1.52
--- php4/ext/standard/filestat.c:1.51   Thu Dec  7 04:09:38 2000
+++ php4/ext/standard/filestat.c        Sun Jan 21 09:26:43 2001
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: filestat.c,v 1.51 2000/12/07 12:09:38 sas Exp $ */
+/* $Id: filestat.c,v 1.52 2001/01/21 17:26:43 rasmus Exp $ */
 
 #include "php.h"
 #include "safe_mode.h"
@@ -551,7 +551,7 @@
                case S_IFDIR: RETURN_STRING("dir",1);
                case S_IFBLK: RETURN_STRING("block",1);
                case S_IFREG: RETURN_STRING("file",1);
-#ifndef ZEND_WIN32
+#if !defined(ZEND_WIN32)&&!defined(__BEOS__)
                case S_IFSOCK: RETURN_STRING("socket",1);
 #endif
                }
Index: php4/ext/standard/fsock.c
diff -u php4/ext/standard/fsock.c:1.60 php4/ext/standard/fsock.c:1.61
--- php4/ext/standard/fsock.c:1.60      Sat Jan 13 15:49:44 2001
+++ php4/ext/standard/fsock.c   Sun Jan 21 09:26:43 2001
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: fsock.c,v 1.60 2001/01/13 23:49:44 zeev Exp $ */
+/* $Id: fsock.c,v 1.61 2001/01/21 17:26:43 rasmus Exp $ */
 
 /* Synced with php 3.0 revision 1.121 1999-06-18 [ssb] */
 /* Synced with php 3.0 revision 1.133 1999-07-21 [sas] */
@@ -48,8 +48,10 @@
 #else
 #include <netinet/in.h>
 #include <netdb.h>
+#if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
+#endif
 #ifdef PHP_WIN32
 #undef AF_UNIX
 #endif
@@ -136,7 +138,8 @@
                                                struct timeval *timeout)
 {
 /* probably won't work on Win32, someone else might try it (read: fix it ;) */
-#if !defined(PHP_WIN32) && (defined(O_NONBLOCK) || defined(O_NDELAY))
+
+#if (!defined(__BEOS__) && !defined(PHP_WIN32)) && (defined(O_NONBLOCK) || 
+defined(O_NDELAY))
 
 #ifndef O_NONBLOCK
 #define O_NONBLOCK O_NDELAY
Index: php4/ext/standard/ftp_fopen_wrapper.c
diff -u php4/ext/standard/ftp_fopen_wrapper.c:1.2 
php4/ext/standard/ftp_fopen_wrapper.c:1.3
--- php4/ext/standard/ftp_fopen_wrapper.c:1.2   Fri Oct 13 02:13:00 2000
+++ php4/ext/standard/ftp_fopen_wrapper.c       Sun Jan 21 09:26:43 2001
@@ -17,7 +17,7 @@
    |          Hartmut Holzgraefe <[EMAIL PROTECTED]>                       |
    +----------------------------------------------------------------------+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.2 2000/10/13 09:13:00 dbeu Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.3 2001/01/21 17:26:43 rasmus Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -51,7 +51,9 @@
 #else
 #include <netinet/in.h>
 #include <netdb.h>
+#if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 #endif
 
 #ifdef PHP_WIN32
Index: php4/ext/standard/http_fopen_wrapper.c
diff -u php4/ext/standard/http_fopen_wrapper.c:1.5 
php4/ext/standard/http_fopen_wrapper.c:1.6
--- php4/ext/standard/http_fopen_wrapper.c:1.5  Sat Jan 13 05:02:19 2001
+++ php4/ext/standard/http_fopen_wrapper.c      Sun Jan 21 09:26:43 2001
@@ -17,7 +17,7 @@
    |          Hartmut Holzgraefe <[EMAIL PROTECTED]>                       |
    +----------------------------------------------------------------------+
  */
-/* $Id: http_fopen_wrapper.c,v 1.5 2001/01/13 13:02:19 zeev Exp $ */
+/* $Id: http_fopen_wrapper.c,v 1.6 2001/01/21 17:26:43 rasmus Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -51,7 +51,9 @@
 #else
 #include <netinet/in.h>
 #include <netdb.h>
+#if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 #endif
 
 #ifdef PHP_WIN32
Index: php4/ext/standard/mail.c
diff -u php4/ext/standard/mail.c:1.28 php4/ext/standard/mail.c:1.29
--- php4/ext/standard/mail.c:1.28       Thu Aug  3 12:26:19 2000
+++ php4/ext/standard/mail.c    Sun Jan 21 09:26:43 2001
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mail.c,v 1.28 2000/08/03 19:26:19 hholzgra Exp $ */
+/* $Id: mail.c,v 1.29 2001/01/21 17:26:43 rasmus Exp $ */
 
 #include <stdlib.h>
 #include <ctype.h>
@@ -25,7 +25,12 @@
 #include "ext/standard/info.h"
 #if !defined(PHP_WIN32)
 #include "build-defs.h"
+#if HAVE_SYSEXITS_H
 #include <sysexits.h>
+#endif
+#if HAVE_SYS_SYSEXITS_H
+#include <sys/sysexits.h>
+#endif
 #endif
 #include "php_mail.h"
 #include "php_ini.h"
Index: php4/ext/standard/syslog.c
diff -u php4/ext/standard/syslog.c:1.23 php4/ext/standard/syslog.c:1.24
--- php4/ext/standard/syslog.c:1.23     Fri Sep  8 04:24:08 2000
+++ php4/ext/standard/syslog.c  Sun Jan 21 09:26:43 2001
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: syslog.c,v 1.23 2000/09/08 11:24:08 stas Exp $ */
+/* $Id: syslog.c,v 1.24 2001/01/21 17:26:43 rasmus Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -86,7 +86,9 @@
        REGISTER_LONG_CONSTANT("LOG_CONS", LOG_CONS, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("LOG_ODELAY", LOG_ODELAY, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("LOG_NDELAY", LOG_NDELAY, CONST_CS | CONST_PERSISTENT);
+#ifdef LOG_NOWAIT
        REGISTER_LONG_CONSTANT("LOG_NOWAIT", LOG_NOWAIT, CONST_CS | CONST_PERSISTENT);
+#endif
 #ifdef LOG_PERROR
        /* AIX doesn't have LOG_PERROR */
        REGISTER_LONG_CONSTANT("LOG_PERROR", LOG_PERROR, CONST_CS | CONST_PERSISTENT); 
/*log to stderr*/
@@ -173,7 +175,10 @@
        SET_VAR_LONG("LOG_CONS", LOG_CONS);
        SET_VAR_LONG("LOG_ODELAY", LOG_ODELAY);
        SET_VAR_LONG("LOG_NDELAY", LOG_NDELAY);
+#ifdef LOG_NOWAIT
+       /* BeOS doesn't have LOG_NOWAIT */
        SET_VAR_LONG("LOG_NOWAIT", LOG_NOWAIT);
+#endif
 #ifdef LOG_PERROR
        /* AIX doesn't have LOG_PERROR */
        SET_VAR_LONG("LOG_PERROR", LOG_PERROR); /*log to stderr*/
Index: php4/main/fopen-wrappers.c
diff -u php4/main/fopen-wrappers.c:1.109 php4/main/fopen-wrappers.c:1.110
--- php4/main/fopen-wrappers.c:1.109    Sat Dec 16 12:52:43 2000
+++ php4/main/fopen-wrappers.c  Sun Jan 21 09:26:44 2001
@@ -16,7 +16,7 @@
    |          Jim Winstead <[EMAIL PROTECTED]>                                 |
    +----------------------------------------------------------------------+
  */
-/* $Id: fopen-wrappers.c,v 1.109 2000/12/16 20:52:43 andi Exp $ */
+/* $Id: fopen-wrappers.c,v 1.110 2001/01/21 17:26:44 rasmus Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -66,7 +66,9 @@
 #else
 #include <netinet/in.h>
 #include <netdb.h>
+#if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 #endif
 
 #ifdef PHP_WIN32
Index: php4/main/network.c
diff -u php4/main/network.c:1.13 php4/main/network.c:1.14
--- php4/main/network.c:1.13    Tue Jan 16 22:40:48 2001
+++ php4/main/network.c Sun Jan 21 09:26:44 2001
@@ -15,7 +15,7 @@
    | Authors: Stig Venaas <[EMAIL PROTECTED]>                             |
    +----------------------------------------------------------------------+
  */
-/* $Id: network.c,v 1.13 2001/01/17 06:40:48 rasmus Exp $ */
+/* $Id: network.c,v 1.14 2001/01/21 17:26:44 rasmus Exp $ */
 
 #include "php.h"
 
@@ -36,7 +36,9 @@
 #ifndef PHP_WIN32
 #include <netinet/in.h>
 #include <netdb.h>
+#if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 #else
 int             inet_aton(const char *, struct in_addr *);
 #endif
Index: php4/main/php_open_temporary_file.c
diff -u php4/main/php_open_temporary_file.c:1.4 php4/main/php_open_temporary_file.c:1.5
--- php4/main/php_open_temporary_file.c:1.4     Tue Nov  7 13:13:26 2000
+++ php4/main/php_open_temporary_file.c Sun Jan 21 09:26:44 2001
@@ -34,14 +34,20 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
+#if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
+#endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
 
 #ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
+#endif
+
+#if !defined(P_tmpdir)
+#define P_tmpdir ""
 #endif
 
 /* {{{ php_open_temporary_file */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to