fixup commit for tag 'SPLITWINDOW_20050714_INITIAL_TRUNK_LANDING' SPLITWINDOW_20050714_INITIAL_TRUNK_LANDING
authorcvs2hg
Tue, 28 Jun 2005 21:27:58 +0000
changeset 5731 d8d6ca66d6acf6eac40ce0c92c13ec98975e5f90
parent 5630 f5797124e4ed7fe1ada40c18b032806e9ddf3c35
child 5737 cff18a05d889139983a42993792dcb7e3b5a0f64
push idunknown
push userunknown
push dateunknown
fixup commit for tag 'SPLITWINDOW_20050714_INITIAL_TRUNK_LANDING'
dbm/include/mcom_db.h
dbm/include/winfile.h
dbm/src/Makefile.in
security/coreconf/Darwin.mk
--- a/dbm/include/mcom_db.h
+++ b/dbm/include/mcom_db.h
@@ -69,16 +69,21 @@
  * SUCH DAMAGE.
  *
  *	@(#)db.h	8.7 (Berkeley) 6/16/94
  */
 
 #ifndef _DB_H_
 #define	_DB_H_
 
+
+#ifdef WINCE
+#define off_t long
+#endif
+
 #ifndef macintosh
 #include <sys/types.h>
 #endif
 #include "prtypes.h"
 
 #include <limits.h>
 
 #ifdef __DBINTERFACE_PRIVATE
--- a/dbm/include/winfile.h
+++ b/dbm/include/winfile.h
@@ -26,17 +26,23 @@ typedef struct DIR_Struct {
 } DIR;
 
 #define _ST_FSTYPSZ 16
 
 #if !defined(__BORLANDC__) && !defined(__GNUC__)
  typedef unsigned long mode_t;
  typedef          long uid_t;
  typedef          long gid_t;
+
+#ifdef WINCE
+ typedef          long ino_t;
+#else
  typedef          long off_t;
+#endif
+
  typedef unsigned long nlink_t;
 #endif 
 
 typedef struct timestruc {
     time_t  tv_sec;         /* seconds */
     long    tv_nsec;        /* and nanoseconds */
 } timestruc_t;
 
--- a/dbm/src/Makefile.in
+++ b/dbm/src/Makefile.in
@@ -64,12 +64,16 @@ LOCAL_INCLUDES	= -I$(srcdir)/../include
 
 FORCE_STATIC_LIB = 1
 FORCE_USE_PIC = 1
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES		+= -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG)
 
+ifeq ($(OS_ARCH),WINCE)
+DEFINES     += -D__STDC__ -DDBM_REOPEN_ON_FLUSH
+endif
+
 ifeq ($(OS_ARCH),AIX)
 OS_LIBS		+= -lc_r
 endif
 
--- a/security/coreconf/Darwin.mk
+++ b/security/coreconf/Darwin.mk
@@ -46,35 +46,64 @@ RANLIB		= ranlib
 ifeq (86,$(findstring 86,$(OS_TEST)))
 OS_REL_CFLAGS	= -Di386
 CPU_ARCH	= i386
 else
 OS_REL_CFLAGS	= -Dppc
 CPU_ARCH	= ppc
 endif
 
+ifneq (,$(NEXT_ROOT))
+    GCC_VERSION_FULL := $(shell $(CC) -v 2>&1 | grep "gcc version" | sed -e "s/^.*gcc version[  ]*//" | awk '{ print $$1 }')
+    GCC_VERSION_MAJOR := $(shell echo $(GCC_VERSION_FULL) | awk -F. '{ print $$1 }')
+    GCC_VERSION_MINOR := $(shell echo $(GCC_VERSION_FULL) | awk -F. '{ print $$2 }')
+    GCC_VERSION := $(GCC_VERSION_MAJOR).$(GCC_VERSION_MINOR)
+
+    DARWIN_SDK_CFLAGS := -nostdinc
+
+    ifeq (,$(filter-out 2 3,$(GCC_VERSION_MAJOR)))
+        # GCC <= 3
+        DARWIN_TARGET_ARCH_LIB := darwin
+        DARWIN_SDK_CFLAGS += -isystem $(NEXT_ROOT)/usr/include/gcc/darwin/$(GCC_VERSION)
+    else
+        # GCC >= 4
+        CPU_ARCH_LONG := $(shell uname -p)
+        DARWIN_TARGET_ARCH_LIB := $(CPU_ARCH_LONG)-apple-darwin$(shell echo $NEXT_ROOT | perl -pe 's/MacOSX10\.([\d]*)//;if ($$1) {$$_=$$1+4;} else {$$_="'${OS_RELEASE}'";s/(\d+)//;$$_=$$1;}')
+        DARWIN_SDK_CFLAGS += -isystem $(NEXT_ROOT)/usr/lib/gcc/$(DARWIN_TARGET_ARCH_LIB)/$(GCC_VERSION_FULL)/include
+    endif
+
+    DARWIN_SDK_CFLAGS += -isystem $(NEXT_ROOT)/usr/include -F$(NEXT_ROOT)/System/Library/Frameworks
+    DARWIN_SDK_LDFLAGS := -L$(NEXT_ROOT)/usr/lib/gcc/$(DARWIN_TARGET_ARCH_LIB) -L$(NEXT_ROOT)/usr/lib/gcc/$(DARWIN_TARGET_ARCH_LIB)/$(GCC_VERSION_FULL) -L$(NEXT_ROOT)/usr/lib
+
+    ifneq (,$(shell find $(NEXT_ROOT)/Library/Frameworks -maxdepth 0))
+        DARWIN_SDK_CFLAGS += -F$(NEXT_ROOT)/Library/Frameworks
+    endif
+
+    LDFLAGS += $(DARWIN_SDK_LDFLAGS)
+endif
+
 # "Commons" are tentative definitions in a global scope, like this:
 #     int x;
 # The meaning of a common is ambiguous.  It may be a true definition:
 #     int x = 0;
 # or it may be a declaration of a symbol defined in another file:
 #     extern int x;
 # Use the -fno-common option to force all commons to become true
 # definitions so that the linker can catch multiply-defined symbols.
 # Also, common symbols are not allowed with Darwin dynamic libraries.
 
-OS_CFLAGS	= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wmost -fpascal-strings -no-cpp-precomp -fno-common -pipe -DDARWIN -DHAVE_STRERROR -DHAVE_BSD_FLOCK
+OS_CFLAGS	= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wmost -fpascal-strings -no-cpp-precomp -fno-common -pipe -DDARWIN -DHAVE_STRERROR -DHAVE_BSD_FLOCK $(DARWIN_SDK_CFLAGS)
 
 ifdef BUILD_OPT
 OPTIMIZER	= -O2
 endif
 
 ARCH		= darwin
 
 # May override this with -bundle to create a loadable module.
-DSO_LDOPTS	= -dynamiclib -compatibility_version 1 -current_version 1 -install_name @executable_path/$(notdir $@) -headerpad_max_install_names
+DSO_LDOPTS	= -dynamiclib -compatibility_version 1 -current_version 1 -install_name @executable_path/$(notdir $@) -headerpad_max_install_names $(DARWIN_SDK_LDFLAGS)
 
 MKSHLIB		= $(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS)
 DLL_SUFFIX	= dylib
 PROCESS_MAP_FILE = grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \
                 sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,_,' > $@
 
 G++INCLUDES	= -I/usr/include/g++