[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[xml] libmxl2 for BeOS



Hi,

I've compiled and changed a little bit (only networking part) libxml2 
and libxslt for BeOS. I'm sure many compiled it before me but i don't 
know if someone send You patch. It would be great if BeOS could be 
"officially" supported (like CVS version compiling out-of-the-box on 
BeOS).

THX for great library :)
Regards
Shard
diff -r -u /boot/home/_Unzipped/libxml2-2.5.11/nanoftp.c /BeStorage/_Sources/Apps/My/LibPak/src_current/libxml2-2.5.11/nanoftp.c
--- /boot/home/_Unzipped/libxml2-2.5.11/nanoftp.c	Thu Aug 14 03:23:24 2003
+++ /BeStorage/_Sources/Apps/My/LibPak/src_current/libxml2-2.5.11/nanoftp.c	Sat Sep 27 18:12:24 2003
@@ -90,12 +90,15 @@
  * A couple portability macros
  */
 #ifndef _WINSOCKAPI_
+#ifndef __BEOS__
 #define closesocket(s) close(s)
+#endif
 #define SOCKET int
 #endif
 #if defined(VMS) || defined(__VMS)
 #define SOCKLEN_T unsigned int
 #endif
+
 
 #define FTP_COMMAND_OK		200
 #define FTP_SYNTAX_ERROR	500
diff -r -u /boot/home/_Unzipped/libxml2-2.5.11/nanohttp.c /BeStorage/_Sources/Apps/My/LibPak/src_current/libxml2-2.5.11/nanohttp.c
--- /boot/home/_Unzipped/libxml2-2.5.11/nanohttp.c	Thu Aug 14 03:23:25 2003
+++ /BeStorage/_Sources/Apps/My/LibPak/src_current/libxml2-2.5.11/nanohttp.c	Sat Sep 27 18:11:54 2003
@@ -95,7 +95,9 @@
  * A couple portability macros
  */
 #ifndef _WINSOCKAPI_
+#ifndef __BEOS__
 #define closesocket(s) close(s)
+#endif
 #define SOCKET int
 #endif
 
@@ -828,7 +830,7 @@
     else
 #endif
     {
-	s = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
+	s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
 	addrlen = sizeof (struct sockaddr_in);
     }
     if (s==-1) {
@@ -922,6 +924,7 @@
     if ( FD_ISSET(s, &wfd) ) {
 	SOCKLEN_T len;
 	len = sizeof(status);
+#ifdef SO_ERROR
 	if (getsockopt(s, SOL_SOCKET, SO_ERROR, (char*)&status, &len) < 0 ) {
 	    /* Solaris error code */
 	    xmlGenericError( xmlGenericErrorContext,
@@ -930,6 +933,7 @@
 				strerror( socket_errno( ) ) );
 	    return (-1);
 	}
+#endif
 	if ( status ) {
 	    closesocket(s);
 	    errno = status;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]