r3455: some more portability fixes. We nearly compile on solaris again now.
authorAndrew Tridgell <tridge@samba.org>
Tue, 2 Nov 2004 03:44:52 +0000 (03:44 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:15 +0000 (13:05 -0500)
(This used to be commit 4f33247f1ca60416415a61a7afac43c9dc8a61fd)

source4/include/includes.h
source4/include/system/filesys.h
source4/include/system/resource.h [deleted file]
source4/lib/replace.c
source4/ntvfs/ipc/vfs_ipc.c
source4/ntvfs/posix/pvfs_open.c
source4/ntvfs/posix/pvfs_read.c
source4/ntvfs/posix/pvfs_search.c
source4/smb_server/conn.c

index c511a5fb337b5aa7f0b1a7cc936373c60b5ad042..ce8f81c53971653bdba50854e8dcd8caf60ad583 100644 (file)
@@ -172,14 +172,6 @@ struct ipv4_addr {
        uint32_t s_addr;
 };
 
-#ifndef UINT8_MAX
-#define UINT8_MAX 255
-#endif
-
-#ifndef UINT16_MAX
-#define UINT16_MAX 65535
-#endif
-
 #ifndef MIN
 #define MIN(a,b) ((a)<(b)?(a):(b))
 #endif
index 1ddb6b687c1b050b65ce6ef4858d7ea88681022f..07465c1c56cb2b33c4fbabe16eae0823d3fcf491 100644 (file)
 #include <dlfcn.h>
 #endif
 
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+
 #ifndef RTLD_LAZY
 #define RTLD_LAZY 0
 #endif
 #ifndef HAVE_RENAME
 int rename(const char *zfrom, const char *zto);
 #endif
+
+#ifndef UINT16_MAX
+#define UINT16_MAX 65535
+#endif
+
diff --git a/source4/include/system/resource.h b/source4/include/system/resource.h
deleted file mode 100644 (file)
index e95448e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   resource system include wrappers
-
-   Copyright (C) Andrew Tridgell 2004
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
index 60faa473b64e144434819dce8966c1f1e744ee97..35e0277c59bb9ccb27525e95697e5c91b3c391c0 100644 (file)
@@ -21,6 +21,7 @@
 #include "includes.h"
 #include "system/wait.h"
 #include "system/time.h"
+#include "system/network.h"
 
  void replace_dummy(void);
  void replace_dummy(void) {}
@@ -328,7 +329,7 @@ duplicate a string
 #ifndef WITH_PTHREADS
 /* REWRITE: not thread safe */
 #ifdef REPLACE_INET_NTOA
-char *rep_inet_ntoa(struct ipv4_addr ip)
+ char *rep_inet_ntoa(struct in_addr ip)
 {
        uint8_t *p = (uint8_t *)&ip.s_addr;
        static char buf[18];
index f7eac65712fec879f75ffb4099a1ced1f199a92e..6b6dc9700348a2b3aa0a193819c3424a7a84acfb 100644 (file)
@@ -26,6 +26,7 @@
 
 
 #include "includes.h"
+#include "system/filesys.h"
 
 /* this is the private structure used to keep the state of an open
    ipc$ connection. It needs to keep information about all open
index bc56962912bb9fac9879dfa35a11634dff4ff767..89da0f4b34af882710bb120f406b9d535fc576da 100644 (file)
@@ -23,6 +23,7 @@
 #include "include/includes.h"
 #include "vfs_posix.h"
 #include "system/time.h"
+#include "system/filesys.h"
 
 /*
   create file handles with convenient numbers for sniffers
index 1f89f01a03579799b71fa0ea5601c674848c0f36..0082f742120b0f2d1ca23e2b632c4a8d9e9ef71d 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "include/includes.h"
 #include "vfs_posix.h"
+#include "system/filesys.h"
 
 /*
   read from a file
index 18e22c2e980f74067e2566c85549e7279ec0eece..0eb1573006c9b6c94c12462104954965a9bb75a1 100644 (file)
@@ -23,6 +23,7 @@
 #include "include/includes.h"
 #include "vfs_posix.h"
 #include "system/time.h"
+#include "system/filesys.h"
 
 
 /* the state of a search started with pvfs_search_first() */
index cdfd3a0bcd60b557f421e849293d70ed476f9a99..b3970b252c221f65761dd19b25d1fc1528042660 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "system/filesys.h"
 
 /****************************************************************************
 init the tcon structures