Portability improvements.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 18 Mar 2011 19:04:15 +0000 (19:04 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 18 Mar 2011 19:04:15 +0000 (19:04 +0000)
org.gridsite.core/src/gridsite-storage.c
org.gridsite.core/src/grst_admin_file.c
org.gridsite.core/src/grst_admin_main.c
org.gridsite.core/src/htcp.c
org.gridsite.core/src/mod_gridsite.c
org.gridsite.core/src/slashgrid.c

index 9d076e9..54bbe47 100644 (file)
@@ -45,7 +45,6 @@
 #include <stdlib.h>
 #include <getopt.h>
 #include <string.h>
-#include <malloc.h>
 #include <dirent.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
index fff3cc4..6d95e8a 100644 (file)
@@ -51,7 +51,13 @@ POSSIBILITY OF SUCH DAMAGE.
 #include <fcntl.h>
 
 // when porting: remember that sendfile() is very OS-specific!
+#if defined(FREEBSD) || defined(__FreeBSD__) 
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+#else
 #include <sys/sendfile.h>
+#endif
 
 #include <gridsite.h>
 
index 759dffa..d6bd981 100644 (file)
 #include <fcntl.h>
 
 // when porting: remember that sendfile() is very OS-specific!
+#if defined(FREEBSD) || defined(__FreeBSD__) 
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+#else
 #include <sys/sendfile.h>
+#endif
 
 #include <gridsite.h>
 
index e93fede..cbd9eb0 100644 (file)
@@ -45,7 +45,6 @@
 #include <stdlib.h>
 #include <getopt.h>
 #include <string.h>
-#include <malloc.h>
 #include <dirent.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
index 82c52f8..d9bf970 100644 (file)
@@ -88,7 +88,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>              
 #include <netdb.h>
-#include <malloc.h>
 #include <stdlib.h>
 #include <string.h>
 #include <dirent.h>
index 076ff76..0869b19 100644 (file)
@@ -51,7 +51,7 @@
 #include <unistd.h>              
 #include <signal.h>
 #include <dirent.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include <curl/curl.h>
 #include <pthread.h>
 #include <pwd.h>