mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:43:02 +01:00
First round of changes to FB2 to get the Darwin build working again.
This commit is contained in:
parent
76e36d0b32
commit
7dfce99342
@ -33,6 +33,8 @@ AC_CHECK_HEADERS(ctype.h)
|
|||||||
AC_CHECK_HEADERS(string.h)
|
AC_CHECK_HEADERS(string.h)
|
||||||
AC_CHECK_HEADERS(signal.h)
|
AC_CHECK_HEADERS(signal.h)
|
||||||
|
|
||||||
|
AC_CHECK_TYPE(socklen_t, int)
|
||||||
|
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NETWARE_386
|
#ifdef NETWARE_386
|
||||||
#define MASK 0
|
#define OPEN_MASK 0
|
||||||
#else
|
#else
|
||||||
struct tgbl *gdgbl;
|
struct tgbl *gdgbl;
|
||||||
#endif
|
#endif
|
||||||
@ -125,8 +125,8 @@ struct tgbl *gdgbl;
|
|||||||
#define FOPEN_READ_TYPE "r"
|
#define FOPEN_READ_TYPE "r"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MASK
|
#ifndef OPEN_MASK
|
||||||
#define MASK 0666
|
#define OPEN_MASK 0666
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SWITCH_CHAR
|
#ifndef SWITCH_CHAR
|
||||||
@ -1642,7 +1642,7 @@ static SSHORT open_files(TEXT * file1,
|
|||||||
if ((fil->fil_fd = MVOL_open(fil->fil_name, MODE_WRITE,
|
if ((fil->fil_fd = MVOL_open(fil->fil_name, MODE_WRITE,
|
||||||
CREATE_ALWAYS)) == INVALID_HANDLE_VALUE)
|
CREATE_ALWAYS)) == INVALID_HANDLE_VALUE)
|
||||||
#else
|
#else
|
||||||
if ((fil->fil_fd = open(fil->fil_name, MODE_WRITE, MASK)) == -1)
|
if ((fil->fil_fd = open(fil->fil_name, MODE_WRITE, OPEN_MASK)) == -1)
|
||||||
#endif /* WIN_NT */
|
#endif /* WIN_NT */
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -23,20 +23,23 @@
|
|||||||
#define HAVE_STRING_H 1
|
#define HAVE_STRING_H 1
|
||||||
#define HAVE_SIGNAL_H 1
|
#define HAVE_SIGNAL_H 1
|
||||||
|
|
||||||
|
/* types */
|
||||||
|
#define socklen_t int
|
||||||
|
|
||||||
|
|
||||||
/* Is the platform big endian? */
|
/* Is the platform big endian? */
|
||||||
#define WORDS_BIGENDIAN 0
|
#define WORDS_BIGENDIAN 1
|
||||||
|
|
||||||
/* CPU types */
|
/* CPU types */
|
||||||
/* #undef PowerPC */
|
#define PowerPC 1
|
||||||
/* #undef sparc */
|
/* #undef sparc */
|
||||||
/* #undef i386 */
|
/* #undef i386 */
|
||||||
/* #undef mips */
|
/* #undef mips */
|
||||||
/* #undef alpha */
|
/* #undef alpha */
|
||||||
|
|
||||||
/* various OS efforts */
|
/* various OS efforts */
|
||||||
/* #undef DARWIN */
|
#define DARWIN 1
|
||||||
#define LINUX 1
|
/* #undef LINUX */
|
||||||
/* #undef FREEBSD */
|
/* #undef FREEBSD */
|
||||||
/* #undef NETBSD */
|
/* #undef NETBSD */
|
||||||
/* #undef apollo */
|
/* #undef apollo */
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* Solaris x86 changes - Konstantin Kuznetsov, Neil McCalden
|
* Solaris x86 changes - Konstantin Kuznetsov, Neil McCalden
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: isc_ipc.cpp,v 1.3 2001-07-29 17:42:22 skywalker Exp $ */
|
/* $Id: isc_ipc.cpp,v 1.4 2001-08-04 22:48:18 bellardo Exp $ */
|
||||||
|
|
||||||
#ifdef SHLIB_DEFS
|
#ifdef SHLIB_DEFS
|
||||||
#define LOCAL_SHLIB_DEFS
|
#define LOCAL_SHLIB_DEFS
|
||||||
@ -798,7 +798,7 @@ static void isc_signal2(
|
|||||||
memset(&vec.sa_mask, 0, sizeof(vec.sa_mask));
|
memset(&vec.sa_mask, 0, sizeof(vec.sa_mask));
|
||||||
vec.sa_flags = SA_RESTART;
|
vec.sa_flags = SA_RESTART;
|
||||||
sigaction(signal_number, &vec, &old_vec);
|
sigaction(signal_number, &vec, &old_vec);
|
||||||
ptr = (FPTR_VOID) old_vec.sa_handler;
|
ptr = old_vec.sa_handler;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#pragma FB_COMPILER_MESSAGE("Fix! Ugly function pointer casts!")
|
#pragma FB_COMPILER_MESSAGE("Fix! Ugly function pointer casts!")
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
# Contributor(s):
|
# Contributor(s):
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# $Id: Makefile.in.gpre,v 1.3 2001-08-01 04:18:37 skywalker Exp $
|
# $Id: Makefile.in.gpre,v 1.4 2001-08-04 22:48:18 bellardo Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
ROOT=../..
|
ROOT=../..
|
||||||
@ -76,22 +76,20 @@ gpre : $(GPRE)
|
|||||||
|
|
||||||
|
|
||||||
$(GPRE_BOOT): $(GPRECommon_Objects) $(GPREBoot_Objects) $(LIB)/jrd_boot.a
|
$(GPRE_BOOT): $(GPRECommon_Objects) $(GPREBoot_Objects) $(LIB)/jrd_boot.a
|
||||||
$(STATICEXE_LINK) -o $(GPRE_BOOT) $(DARWIN_FOUNDATION_LINK) $^ $(STATICLINK_LIBS)
|
$(STATICEXE_LINK) -o $(GPRE_BOOT) $^ $(STATICLINK_LIBS)
|
||||||
-$(RM) $(GPRE_CURRENT)
|
-$(RM) $(GPRE_CURRENT)
|
||||||
$(LN) $(@F) $(GPRE_CURRENT)
|
$(LN) $(@F) $(GPRE_CURRENT)
|
||||||
|
|
||||||
|
|
||||||
$(GPRE_STATIC):$(GPRECommon_Objects) $(GPRE_Objects) $(LIB)/jrd_static.a
|
$(GPRE_STATIC):$(GPRECommon_Objects) $(GPRE_Objects) $(LIB)/jrd_static.a
|
||||||
$(STATICEXE_LINK) $(LINK_OPTS) $^ $(COREFOUNDATION_LINK) -o $@ $(STATICLINK_LIBS)
|
$(STATICEXE_LINK) $(LINK_OPTS) $^ -o $@ $(STATICLINK_LIBS)
|
||||||
$(CHMOD_7) $@
|
$(CHMOD_7) $@
|
||||||
-$(RM) $(GPRE_CURRENT)
|
-$(RM) $(GPRE_CURRENT)
|
||||||
$(LN) $(@F) $(GPRE_CURRENT)
|
$(LN) $(@F) $(GPRE_CURRENT)
|
||||||
|
|
||||||
# DARWIN - COREFOUNDATION_LINK should go into darwin link opts or libs.
|
|
||||||
|
|
||||||
|
|
||||||
$(GPRE):$(GPRECommon_Objects) $(GPRE_Objects) $(LIBGDS_LA)
|
$(GPRE):$(GPRECommon_Objects) $(GPRE_Objects) $(LIBGDS_LA)
|
||||||
$(EXE_LINK) $(LINK_OPTS) $^ $(COREFOUNDATION_LINK) -o $@ $(LINK_LIBS)
|
$(EXE_LINK) $(LINK_OPTS) $^ -o $@ $(LINK_LIBS)
|
||||||
$(CHMOD_7) $@
|
$(CHMOD_7) $@
|
||||||
-$(RM) $(GPRE_CURRENT)
|
-$(RM) $(GPRE_CURRENT)
|
||||||
$(LN) $(@F) $(GPRE_CURRENT)
|
$(LN) $(@F) $(GPRE_CURRENT)
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
# Contributor(s):
|
# Contributor(s):
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# $Id: Makefile.in.jrd,v 1.3 2001-08-01 04:18:37 skywalker Exp $
|
# $Id: Makefile.in.jrd,v 1.4 2001-08-04 22:48:18 bellardo Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
ROOT=../..
|
ROOT=../..
|
||||||
@ -75,6 +75,7 @@ $(LIB)/jrd_boot.a: $(BOOT_Objects)
|
|||||||
# Add all the jrd objects to the jrd static library.
|
# Add all the jrd objects to the jrd static library.
|
||||||
|
|
||||||
jrd_static : $(LIB)/jrd_static.a($(JRD_Objects))
|
jrd_static : $(LIB)/jrd_static.a($(JRD_Objects))
|
||||||
|
$(RANLIB) $(LIB)/jrd_static.a
|
||||||
|
|
||||||
$(LIB)/jrd_static.a(%.o) : %.o
|
$(LIB)/jrd_static.a(%.o) : %.o
|
||||||
ar crv $@ $%
|
ar crv $@ $%
|
||||||
@ -104,7 +105,6 @@ $(LIBGDS_A) : $(GDSLIB_Objects)
|
|||||||
$(STATICLIB_LINK) $(LIB_LINK_OPTIONS) $@ $^
|
$(STATICLIB_LINK) $(LIB_LINK_OPTIONS) $@ $^
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#____________________________________________________________________________
|
#____________________________________________________________________________
|
||||||
#
|
#
|
||||||
# Everything below here is crap - well maybe that's an overstatement :-).
|
# Everything below here is crap - well maybe that's an overstatement :-).
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
# Contributor(s):
|
# Contributor(s):
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# $Id: Makefile.in.lock,v 1.2 2001-08-01 04:18:37 skywalker Exp $
|
# $Id: Makefile.in.lock,v 1.3 2001-08-04 22:48:18 bellardo Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
ROOT=../..
|
ROOT=../..
|
||||||
@ -93,7 +93,7 @@ jrdlib_dependencies: $(LOCK_Objects)
|
|||||||
gds_lock_manager : $(BIN)/gds_lock_mgr
|
gds_lock_manager : $(BIN)/gds_lock_mgr
|
||||||
|
|
||||||
$(BIN)/gds_lock_mgr: $(LOCKMGR_Objects) $(LIB)/jrd_static.a
|
$(BIN)/gds_lock_mgr: $(LOCKMGR_Objects) $(LIB)/jrd_static.a
|
||||||
$(CXX) $(LINK_OPTS) $^ -o $@ $(COREFOUNDATION_LINK)
|
$(CXX) $(LINK_OPTS) $^ -o $@
|
||||||
$(CHMOD_S7) $@
|
$(CHMOD_S7) $@
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#undef HAVE_STRING_H
|
#undef HAVE_STRING_H
|
||||||
#undef HAVE_SIGNAL_H
|
#undef HAVE_SIGNAL_H
|
||||||
|
|
||||||
|
/* types */
|
||||||
|
#undef socklen_t
|
||||||
|
|
||||||
|
|
||||||
/* Is the platform big endian? */
|
/* Is the platform big endian? */
|
||||||
#define WORDS_BIGENDIAN 0
|
#define WORDS_BIGENDIAN 0
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
# Contributor(s):
|
# Contributor(s):
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# $Id: make.defaults,v 1.4 2001-08-02 07:03:59 skywalker Exp $
|
# $Id: make.defaults,v 1.5 2001-08-04 22:48:18 bellardo Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@ -63,6 +63,7 @@ CD= cd
|
|||||||
CAT= cat
|
CAT= cat
|
||||||
AR= ar crsu
|
AR= ar crsu
|
||||||
LN= ln -s
|
LN= ln -s
|
||||||
|
RANLIB= @RANLIB@
|
||||||
|
|
||||||
# Default extensions
|
# Default extensions
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
# Contributor(s):
|
# Contributor(s):
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# $Id: make.rules,v 1.3 2001-08-01 04:18:37 skywalker Exp $
|
# $Id: make.rules,v 1.4 2001-08-04 22:48:18 bellardo Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
#____________________________________________________________________________
|
#____________________________________________________________________________
|
||||||
@ -83,11 +83,11 @@ CFLAGS:= $(CFLAGS) -g -pipe -MMD -I$(ROOT)/src -I$(ROOT)/src/include
|
|||||||
|
|
||||||
CXXFLAGS:= $(CXXFLAGS) $(CFLAGS)
|
CXXFLAGS:= $(CXXFLAGS) $(CFLAGS)
|
||||||
|
|
||||||
CC = libtool gcc
|
#CC = libtool @CC@
|
||||||
CXX = libtool g++
|
#CXX = libtool @CXX@
|
||||||
|
|
||||||
#CC = gcc
|
CC = @CC@
|
||||||
#CXX = g++
|
CXX = @CXX@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -111,12 +111,12 @@ CXX = libtool g++
|
|||||||
ifdef UseLibToolForLink
|
ifdef UseLibToolForLink
|
||||||
|
|
||||||
|
|
||||||
LIB_LINK= libtool gcc
|
LIB_LINK= libtool @CC@
|
||||||
STATICLIB_LINK = libtool gcc -all-static
|
STATICLIB_LINK = libtool @CC@ -all-static
|
||||||
LIB_LINK_OPTIONS = -version-info 0:0:0 -release 1.5.0.0 -rpath /usr/lib
|
LIB_LINK_OPTIONS = -version-info 0:0:0 -release 1.5.0.0 -rpath /usr/lib
|
||||||
|
|
||||||
EXE_LINK = libtool gcc
|
EXE_LINK = libtool @CC@
|
||||||
STATICEXE_LINK = libtool gcc -all-static
|
STATICEXE_LINK = libtool @CC@ -all-static
|
||||||
else
|
else
|
||||||
|
|
||||||
LIB_LINK= ld -shared
|
LIB_LINK= ld -shared
|
||||||
@ -124,8 +124,8 @@ else
|
|||||||
# LIB_LINK_OPTIONS = -soname libgds.so -rpath /usr/lib
|
# LIB_LINK_OPTIONS = -soname libgds.so -rpath /usr/lib
|
||||||
LIB_LINK_OPTIONS =
|
LIB_LINK_OPTIONS =
|
||||||
|
|
||||||
EXE_LINK = gcc
|
EXE_LINK = @CC@
|
||||||
STATICEXE_LINK = g++
|
STATICEXE_LINK = @CXX@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
@ -209,6 +209,9 @@ $(OBJ)/%.o: $(SRC)/%.cpp
|
|||||||
$(CXX) $(CXXFLAGS) -c $(firstword $<) -o $@
|
$(CXX) $(CXXFLAGS) -c $(firstword $<) -o $@
|
||||||
@$(move-dep)
|
@$(move-dep)
|
||||||
|
|
||||||
|
$(OBJ)/%.lo: $(SRC)/%.cpp
|
||||||
|
@$(move-dep)
|
||||||
|
|
||||||
#$(OBJ)/%
|
#$(OBJ)/%
|
||||||
#.epp.cpp:
|
#.epp.cpp:
|
||||||
# $(GPRE_STATIC) $(GPRE_FLAGS) $<
|
# $(GPRE_STATIC) $(GPRE_FLAGS) $<
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
# Contributor(s): ______________________________________.
|
# Contributor(s): ______________________________________.
|
||||||
# Start of file prefix.darwin: $(VERSION) @PLATFORM@
|
# Start of file prefix.darwin: $(VERSION) @PLATFORM@
|
||||||
#$Id: prefix.darwin,v 1.1 2001-07-29 23:43:23 skywalker Exp $
|
#$Id: prefix.darwin,v 1.2 2001-08-04 22:48:18 bellardo Exp $
|
||||||
|
|
||||||
|
|
||||||
#_____________________________________________________________________________
|
#_____________________________________________________________________________
|
||||||
@ -29,12 +29,6 @@
|
|||||||
|
|
||||||
# Adding to LINK_LIBS to add the framework thing.
|
# Adding to LINK_LIBS to add the framework thing.
|
||||||
|
|
||||||
LINK_LIBS := $(COREFOUNDATION_LINK) $(LINK_LIBS)
|
|
||||||
STATICLINK_LIBS := $(LINK_LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
CFLAGS := ($CARBONCOORE_DIR_FLAG) $(CFLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# adding another dependancy onto the includes target
|
# adding another dependancy onto the includes target
|
||||||
@ -68,16 +62,17 @@ include_darwin:
|
|||||||
# End add by me MOD 26-July-2001
|
# End add by me MOD 26-July-2001
|
||||||
#______________________________________________________________________________
|
#______________________________________________________________________________
|
||||||
|
|
||||||
|
# use the following to define conditional DEV/PROD compile
|
||||||
|
|
||||||
|
ifdef IsProdTypeBuild
|
||||||
|
DEBUG_Sources= nodebug.cpp
|
||||||
|
CFLAGS:= -O3 -DPROD_BUILD $(CFLAGS)
|
||||||
|
|
||||||
|
else
|
||||||
|
DEBUG_Sources= grammar.c dbg.cpp dbt.cpp dmp.cpp
|
||||||
|
CFLAGS:= -ggdb -DDEV_BUILD $(CFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
.SUFFIXES: .bin .o .cpp .c
|
|
||||||
.cpp.o:
|
|
||||||
$(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $<
|
|
||||||
.cpp.bin:
|
|
||||||
$(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -o $*.bin $<
|
|
||||||
.c.o:
|
|
||||||
$(CC) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $<
|
|
||||||
.c.bin:
|
|
||||||
$(CC) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -o $*.bin $<
|
|
||||||
|
|
||||||
|
|
||||||
PROD_DEBUG_OBJECTS= nodebug.o
|
PROD_DEBUG_OBJECTS= nodebug.o
|
||||||
@ -217,4 +212,33 @@ CARBONCORE_DIR_FLAG= -F/System/Library/Frameworks/CoreServices.framework/Framewo
|
|||||||
DARWIN_COREFOUNDATION_LINK= -framework CoreFoundation
|
DARWIN_COREFOUNDATION_LINK= -framework CoreFoundation
|
||||||
DARWIN_FOUNDATION_LINK= -framework Foundation
|
DARWIN_FOUNDATION_LINK= -framework Foundation
|
||||||
|
|
||||||
|
# Options for linking the FB shared library.
|
||||||
|
LIBGDS_SO := $(LIB)/libgds.dylib
|
||||||
|
LIB_LINK := libtool -dynamic \
|
||||||
|
-install_name $(FW_NAME)/Versions/A/$(FBFW_PREFIX) \
|
||||||
|
-current_version $(FW_VERS) \
|
||||||
|
-compatibility_version $(FW_COMPAT_VERS)
|
||||||
|
LIB_LINK_OPTIONS := -framework System -framework CoreFoundation -lstdc++ -lcc_dynamic
|
||||||
|
|
||||||
|
# The routines used for IO. Darwin uses the unix routines.
|
||||||
|
IO_Sources= unix.cpp
|
||||||
|
|
||||||
|
# Add in the platform specific link options
|
||||||
|
LINK_LIBS := $(DARWIN_COREFOUNDATION_LINK)
|
||||||
|
STATICLINK_LIBS := $(LINK_LIBS)
|
||||||
|
LINK_OPTS := $(DARWIN_COREFOUNDATION_LINK)
|
||||||
|
|
||||||
|
|
||||||
|
# We need to over ride some of the defaults set in make.defaults
|
||||||
|
AR= ar cru
|
||||||
|
|
||||||
|
# Define our own rules to over ride those in make.rules
|
||||||
|
CFLAGS := $(CARBONCORE_DIR_FLAG) $(CFLAGS)
|
||||||
|
|
||||||
|
# If we don't define CXXFLAGS again, our changes to CFLAGS won't take effect
|
||||||
|
# for CXXFLAGS
|
||||||
|
CXXFLAGS:= $(CXXFLAGS) $(CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# End of file prefix.darwin: $(VERSION) $(PLATFORM)
|
# End of file prefix.darwin: $(VERSION) $(PLATFORM)
|
||||||
|
Loading…
Reference in New Issue
Block a user