2009-09-15 00:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbthread.h
* include/hbdefs.h
* include/hbsetup.h
* include/hbinit.h
* source/common/hbprintf.c
* source/rtl/hbsocket.c
+ config/haiku
+ config/haiku/libs.mk
+ config/haiku/gcc.mk
+ config/haiku/global.mk
* config/global.mk
* config/detect.mk
+ Applied patch adding Haiku OS port to Harbour.
By Tamas Tevesz.
* INSTALL
+ Added haiku to supported OS list (in 'experimental' status)
This commit is contained in:
@@ -17,6 +17,25 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-09-15 00:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/hbthread.h
|
||||
* include/hbdefs.h
|
||||
* include/hbsetup.h
|
||||
* include/hbinit.h
|
||||
* source/common/hbprintf.c
|
||||
* source/rtl/hbsocket.c
|
||||
+ config/haiku
|
||||
+ config/haiku/libs.mk
|
||||
+ config/haiku/gcc.mk
|
||||
+ config/haiku/global.mk
|
||||
* config/global.mk
|
||||
* config/detect.mk
|
||||
+ Applied patch adding Haiku OS port to Harbour.
|
||||
By Tamas Tevesz.
|
||||
|
||||
* INSTALL
|
||||
+ Added haiku to supported OS list (in 'experimental' status)
|
||||
|
||||
2009-09-14 12:43 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
% Deleted UTF-8 hack. Now using the built-in UTF-8 conversion
|
||||
|
||||
@@ -321,6 +321,7 @@ SUPPORTED PLATFORMS AND C COMPILERS
|
||||
linux - Linux
|
||||
darwin - Mac OS X
|
||||
bsd - FreeBSD / OpenBSD / NetBSD / *BSD
|
||||
haiku - Haiku (experimental)
|
||||
hpux - HP-UX
|
||||
sunos - Sun Solaris / OpenSolaris
|
||||
win - MS Windows (all flavors)
|
||||
@@ -352,6 +353,10 @@ SUPPORTED PLATFORMS AND C COMPILERS
|
||||
----
|
||||
gcc - GNU C
|
||||
|
||||
haiku
|
||||
-----
|
||||
gcc - GNU C
|
||||
|
||||
sunos
|
||||
-----
|
||||
gcc - GNU C
|
||||
@@ -981,6 +986,7 @@ BUILD HOST-PLATFORM/SHELL - TARGET-PLATFORM/COMPILER COMPATIBILITY MATRIX
|
||||
x darwin -> win/mingw x86
|
||||
x darwin -> dos/djgpp x86
|
||||
hpux -> hpux/gcc (CPU cross-builds possible)
|
||||
haiku -> haiku/gcc x86
|
||||
x hpux -> wce/mingwarm arm
|
||||
x hpux -> wce/mingw x86
|
||||
x hpux -> win/mingw x86
|
||||
|
||||
@@ -47,7 +47,7 @@ _DET_VAR_INC_ := HB_INC_ZLIB
|
||||
_DET_VAR_HAS_ := HB_HAS_ZLIB
|
||||
_DET_FLT_PLAT :=
|
||||
_DET_FLT_COMP :=
|
||||
_DET_INC_DEFP := /usr/include
|
||||
_DET_INC_DEFP := /usr/include /boot/develop/headers/3rdparty
|
||||
_DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/zlib)
|
||||
_DET_INC_HEAD := /zlib.h
|
||||
|
||||
@@ -118,7 +118,7 @@ _DET_VAR_INC_ := HB_INC_CURSES
|
||||
_DET_VAR_HAS_ := HB_HAS_CURSES
|
||||
_DET_FLT_PLAT := !os2
|
||||
_DET_FLT_COMP :=
|
||||
_DET_INC_DEFP :=
|
||||
_DET_INC_DEFP := /boot/develop/headers/3rdparty
|
||||
_DET_INC_HEAD := /curses.h
|
||||
|
||||
ifeq ($(HB_NCURSES_194),yes)
|
||||
|
||||
@@ -108,6 +108,8 @@ define check_host
|
||||
HB_HOST_PLAT := dos
|
||||
else ifneq ($(findstring msdos,$(1)),)
|
||||
HB_HOST_PLAT := dos
|
||||
else ifneq ($(findstring Haiku,$(1)),)
|
||||
HB_HOST_PLAT := haiku
|
||||
endif
|
||||
|
||||
endef
|
||||
@@ -816,6 +818,12 @@ ifeq ($(HB_COMPILER),)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifeq ($(HB_PLATFORM),haiku)
|
||||
HB_COMP_PATH := $(call find_in_path,gcc)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := gcc
|
||||
endif
|
||||
endif
|
||||
# add other platforms here
|
||||
endif
|
||||
endif
|
||||
|
||||
56
harbour/config/haiku/gcc.mk
Normal file
56
harbour/config/haiku/gcc.mk
Normal file
@@ -0,0 +1,56 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ifeq ($(HB_BUILD_MODE),cpp)
|
||||
HB_CMP := g++
|
||||
else
|
||||
HB_CMP := gcc
|
||||
endif
|
||||
|
||||
OBJ_EXT := .o
|
||||
LIB_PREF := lib
|
||||
LIB_EXT := .a
|
||||
|
||||
HB_DYN_COPT := -DHB_DYNLIB -fpic
|
||||
|
||||
CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX)
|
||||
CC_IN := -c
|
||||
CC_OUT := -o
|
||||
|
||||
CPPFLAGS := -I. -I$(HB_INC_COMPILE)
|
||||
CFLAGS :=
|
||||
LDFLAGS :=
|
||||
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -Wall -W
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(HB_BUILD_DEBUG),yes)
|
||||
CFLAGS += -g
|
||||
endif
|
||||
|
||||
LD := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX)
|
||||
LD_OUT := -o
|
||||
|
||||
LIBPATHS := $(foreach dir,$(LIB_DIR) $(SYSLIBPATHS),-L$(dir))
|
||||
LDLIBS := $(foreach lib,$(LIBS) $(SYSLIBS),-l$(lib))
|
||||
|
||||
LDFLAGS += $(LIBPATHS)
|
||||
|
||||
AR := $(HB_CCPREFIX)ar
|
||||
ARFLAGS :=
|
||||
AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
|
||||
|
||||
DY := $(CC)
|
||||
DFLAGS := -shared $(LIBPATHS)
|
||||
DY_OUT := -o$(subst x,x, )
|
||||
DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib))
|
||||
|
||||
DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS)
|
||||
|
||||
include $(TOP)$(ROOT)config/rules.mk
|
||||
11
harbour/config/haiku/global.mk
Normal file
11
harbour/config/haiku/global.mk
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
all : first
|
||||
|
||||
BIN_EXT :=
|
||||
DYN_EXT := .so
|
||||
DYN_PREF := lib
|
||||
|
||||
HB_GT_LIBS += gttrm
|
||||
36
harbour/config/haiku/libs.mk
Normal file
36
harbour/config/haiku/libs.mk
Normal file
@@ -0,0 +1,36 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
SYSLIBS :=
|
||||
SYSLIBPATHS := /system/lib /boot/develop/abi/x86/gcc2/lib
|
||||
|
||||
ifneq ($(HB_LINKING_RTL),)
|
||||
ifeq ($(HB_CRS_LIB),)
|
||||
HB_CRS_LIB := ncurses
|
||||
endif
|
||||
ifneq ($(HB_HAS_CURSES),)
|
||||
SYSLIBS += $(HB_CRS_LIB)
|
||||
endif
|
||||
ifneq ($(HB_HAS_SLANG),)
|
||||
SYSLIBS += slang
|
||||
endif
|
||||
ifneq ($(HB_HAS_X11),)
|
||||
SYSLIBS += X11
|
||||
# add 64-bit lib dir needed for some distros (red hat)
|
||||
#ifneq ($(findstring 64,$(shell uname -m)),)
|
||||
# SYSLIBPATHS += /usr/X11R6/lib64
|
||||
#endif
|
||||
#SYSLIBPATHS += /usr/X11R6/lib
|
||||
endif
|
||||
ifneq ($(HB_HAS_PCRE),)
|
||||
ifeq ($(HB_HAS_PCRE_LOCAL),)
|
||||
SYSLIBS += pcre
|
||||
endif
|
||||
endif
|
||||
ifeq ($(HB_HAS_ZLIB_LOCAL),)
|
||||
SYSLIBS += z
|
||||
endif
|
||||
SYSLIBS += root socket
|
||||
endif
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
( defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L ) || \
|
||||
( defined( __DJGPP__ ) && \
|
||||
( __DJGPP__ > 2 || ( __DJGPP__ == 2 && __DJGPP_MINOR__ >= 4 ) ) ) || \
|
||||
defined( HB_OS_LINUX ) || defined( HB_OS_DARWIN ) || defined( HB_OS_SUNOS ) ) )
|
||||
defined( HB_OS_LINUX ) || defined( HB_OS_DARWIN ) || defined( HB_OS_SUNOS ) || defined( HB_OS_HAIKU ) ) )
|
||||
#include <stdint.h>
|
||||
/* workaround for BCC 5.8 bug */
|
||||
#if ( defined( __BORLANDC__ ) && __BORLANDC__ >= 1410 )
|
||||
|
||||
@@ -112,7 +112,8 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbo
|
||||
#define HB_CALL_ON_STARTUP_END( func ) \
|
||||
}
|
||||
|
||||
#elif defined( __GNUC__ ) || defined( __SUNPRO_C ) || defined( __SUNPRO_CC )
|
||||
#elif defined( __GNUC__ ) || defined( __SUNPRO_C ) || defined( __SUNPRO_CC ) || \
|
||||
defined( __HAIKU__ )
|
||||
|
||||
#if defined( HB_PRAGMA_STARTUP ) || defined( HB_MSC_STARTUP )
|
||||
#error Wrong macros set for startup code - clean your make/env settings.
|
||||
|
||||
@@ -279,12 +279,19 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HB_OS_HAIKU
|
||||
#if defined( __HAIKU__ )
|
||||
#define HB_OS_HAIKU
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HB_OS_UNIX
|
||||
#if defined( HB_OS_LINUX ) || \
|
||||
defined( HB_OS_DARWIN ) || \
|
||||
defined( HB_OS_BSD ) || \
|
||||
defined( HB_OS_SUNOS ) || \
|
||||
defined( HB_OS_HPUX )
|
||||
defined( HB_OS_HPUX ) || \
|
||||
defined( HB_OS_HAIKU )
|
||||
#define HB_OS_UNIX
|
||||
/* Compatibility. Do not use this. */
|
||||
#ifdef HB_LEGACY_LEVEL2
|
||||
|
||||
@@ -62,7 +62,8 @@
|
||||
defined( HB_OS_DOS )
|
||||
# define HB_TASK_THREAD
|
||||
#elif defined( HB_OS_LINUX ) || defined( HB_OS_DARWIN ) || \
|
||||
defined( HB_OS_SUNOS ) || defined( HB_OS_HPUX )
|
||||
defined( HB_OS_SUNOS ) || defined( HB_OS_HPUX ) || \
|
||||
defined( HB_OS_HAIKU )
|
||||
# include <pthread.h>
|
||||
# define HB_PTHREAD_API
|
||||
#elif defined( HB_OS_WIN )
|
||||
|
||||
@@ -160,7 +160,8 @@ optimized.
|
||||
( defined( __DJGPP__ ) && \
|
||||
( __DJGPP__ < 2 || ( __DJGPP__ == 2 && __DJGPP_MINOR__ <= 3 ) ) ) || \
|
||||
( defined( _MSC_VER ) && \
|
||||
!( defined( __LCC__ ) || defined( __POCC__ ) || defined( __XCC__ ) ) )
|
||||
!( defined( __LCC__ ) || defined( __POCC__ ) || defined( __XCC__ ) ) ) || \
|
||||
( defined( __GNUC__ ) && __GNUC__ < 3 )
|
||||
/* TODO: add other C compilers which does not support [u]intmax_t
|
||||
* definitions (check C compiler version number).
|
||||
* If compiler supports stdint.h then it should be added
|
||||
@@ -283,7 +284,7 @@ optimized.
|
||||
# else
|
||||
# define _x_long_dbl long double
|
||||
# if defined( __WATCOMC__ ) || defined( __MINGW32CE__ ) || defined( __CYGWIN__ ) || \
|
||||
( defined( HB_OS_WIN_CE ) && defined( __POCC__ ) )
|
||||
( defined( HB_OS_WIN_CE ) && defined( __POCC__ ) ) || defined( __HAIKU__ )
|
||||
# define _HB_WRAP_MODFL_
|
||||
# define _MODFD( x, p ) _hb_modfl( x, p )
|
||||
# else
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
#if defined( HB_OS_UNIX ) && ! defined( __CYGWIN__ )
|
||||
# define HB_HAS_UNIX
|
||||
# if !defined( __WATCOMC__ )
|
||||
# if !defined( __WATCOMC__ ) && !defined( __HAIKU__ )
|
||||
# define HB_HAS_INET_ATON
|
||||
# define HB_HAS_INET_PTON
|
||||
# define HB_HAS_INET_NTOP
|
||||
@@ -1044,7 +1044,9 @@ static void hb_socketSetOsError( int err )
|
||||
uiErr = HB_SOCKET_ERR_PROTOTYPE;
|
||||
break;
|
||||
case EOPNOTSUPP:
|
||||
#if defined( SOCKTNOSUPPORT )
|
||||
case ESOCKTNOSUPPORT:
|
||||
#endif
|
||||
uiErr = HB_SOCKET_ERR_NOSUPPORT;
|
||||
break;
|
||||
case EMFILE:
|
||||
@@ -1094,9 +1096,11 @@ static void hb_socketSetOsError( int err )
|
||||
case ESHUTDOWN:
|
||||
uiErr = HB_SOCKET_ERR_SHUTDOWN;
|
||||
break;
|
||||
#if defined( ETOOMANYREFS )
|
||||
case ETOOMANYREFS:
|
||||
uiErr = HB_SOCKET_ERR_TOOMANYREFS;
|
||||
break;
|
||||
#endif
|
||||
case EHOSTDOWN:
|
||||
uiErr = HB_SOCKET_ERR_HOSTDOWN;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user