2010-07-15 16:57 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* INSTALL
+ config/vxworks
+ config/vxworks/libs.mk
+ config/vxworks/gcc.mk
+ config/vxworks/diab.mk
+ config/vxworks/global.mk
+ Started experimental VxWorks port.
; NOTE: VxWorks port was made possible by Wind River Systems Inc.,
who were so kind to mail me a full VxWorks development
environment, for the purpose of porting Harbour to this
platform. Thank you very much guys.
[ The free license is valid for one month, so if anyone
is interested in helping in this project, I can help with
real tests, builds and information. BTW, the devenv is
Eclipse based plus cmdline, running on Windows (available
for Linux and Solaris, too) and the target VxWorks exes
run in a virtual environment. ]
* config/global.mk
+ Added autodetection of VxWorks platform.
* utils/hbmk2/hbmk2.prg
+ Added VxWorks support. It's incomplete yet.
! Fixed to quote *nix/gcc compiler family in
Windows-host cross-platform situations.
* src/vm/thread.c
* src/common/hbgete.c
* src/common/hbffind.c
* src/common/hbtrace.c
* src/common/hbdate.c
* src/rtl/gtstd/gtstd.c
* src/rtl/gttrm/Makefile
* src/rtl/hbsocket.c
* src/rtl/filesys.c
* src/rtl/diskspac.c
* src/rtl/cputime.c
* src/rtl/disksphb.c
* src/rtl/gtpca/gtpca.c
* src/rtl/net.c
* src/rtl/hbproces.c
* src/rtl/gtsys.c
* src/rtl/hbcom.c
* external/zlib/inflate.c
* external/jpeg/jmorecfg.h
* external/pcre/Makefile
* include/hbapifs.h
* include/hbthread.h
* include/hbdefs.h
* include/hbsetup.h
* contrib/xhb/hboutdbg.c
* contrib/xhb/hbsyslog.c
* contrib/xhb/hbserv.c
+ vxworks/gcc port. First phase.
; Please review.
; NOTE: - vxworks has no termios, for serial comm
support it has sioLib.h.
- vxworks supports another C compiler, which
was not tested yet.
- vxworks supports lots of CPUs, only x86 was
tested yet.
- There are still mutex related warnings to sort out.
- Some parts had to disabled, like HB_LIB*() functionality.
; TODO: Regenarate .difs in external/.
* src/vm/hashfunc.c
* Silenced warnings shown by vxworks/gcc.
This commit is contained in:
@@ -16,6 +16,76 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-07-15 16:57 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* INSTALL
|
||||
+ config/vxworks
|
||||
+ config/vxworks/libs.mk
|
||||
+ config/vxworks/gcc.mk
|
||||
+ config/vxworks/diab.mk
|
||||
+ config/vxworks/global.mk
|
||||
+ Started experimental VxWorks port.
|
||||
; NOTE: VxWorks port was made possible by Wind River Systems Inc.,
|
||||
who were so kind to mail me a full VxWorks development
|
||||
environment, for the purpose of porting Harbour to this
|
||||
platform. Thank you very much guys.
|
||||
|
||||
[ The free license is valid for one month, so if anyone
|
||||
is interested in helping in this project, I can help with
|
||||
real tests, builds and information. BTW, the devenv is
|
||||
Eclipse based plus cmdline, running on Windows (available
|
||||
for Linux and Solaris, too) and the target VxWorks exes
|
||||
run in a virtual environment. ]
|
||||
|
||||
* config/global.mk
|
||||
+ Added autodetection of VxWorks platform.
|
||||
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ Added VxWorks support. It's incomplete yet.
|
||||
! Fixed to quote *nix/gcc compiler family in
|
||||
Windows-host cross-platform situations.
|
||||
|
||||
* src/vm/thread.c
|
||||
* src/common/hbgete.c
|
||||
* src/common/hbffind.c
|
||||
* src/common/hbtrace.c
|
||||
* src/common/hbdate.c
|
||||
* src/rtl/gtstd/gtstd.c
|
||||
* src/rtl/gttrm/Makefile
|
||||
* src/rtl/hbsocket.c
|
||||
* src/rtl/filesys.c
|
||||
* src/rtl/diskspac.c
|
||||
* src/rtl/cputime.c
|
||||
* src/rtl/disksphb.c
|
||||
* src/rtl/gtpca/gtpca.c
|
||||
* src/rtl/net.c
|
||||
* src/rtl/hbproces.c
|
||||
* src/rtl/gtsys.c
|
||||
* src/rtl/hbcom.c
|
||||
* external/zlib/inflate.c
|
||||
* external/jpeg/jmorecfg.h
|
||||
* external/pcre/Makefile
|
||||
* include/hbapifs.h
|
||||
* include/hbthread.h
|
||||
* include/hbdefs.h
|
||||
* include/hbsetup.h
|
||||
* contrib/xhb/hboutdbg.c
|
||||
* contrib/xhb/hbsyslog.c
|
||||
* contrib/xhb/hbserv.c
|
||||
+ vxworks/gcc port. First phase.
|
||||
; Please review.
|
||||
; NOTE: - vxworks has no termios, for serial comm
|
||||
support it has sioLib.h.
|
||||
- vxworks supports another C compiler, which
|
||||
was not tested yet.
|
||||
- vxworks supports lots of CPUs, only x86 was
|
||||
tested yet.
|
||||
- There are still mutex related warnings to sort out.
|
||||
- Some parts had to disabled, like HB_LIB*() functionality.
|
||||
; TODO: Regenarate .difs in external/.
|
||||
|
||||
* src/vm/hashfunc.c
|
||||
* Silenced warnings shown by vxworks/gcc.
|
||||
|
||||
2010-07-15 07:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbdoc2/hbdoc2.prg
|
||||
* contrib/hbdoc2/hbdoc2.hbp
|
||||
|
||||
@@ -475,6 +475,7 @@ HARBOUR
|
||||
hpux - HP-UX
|
||||
sunos - Sun Solaris / OpenSolaris
|
||||
qnx - QNX
|
||||
vxworks - VxWorks
|
||||
win - MS Windows (all flavors)
|
||||
(see LINKS section for Win9x requirements)
|
||||
wce - MS Windows CE
|
||||
@@ -516,6 +517,11 @@ HARBOUR
|
||||
---
|
||||
gcc - GNU C
|
||||
|
||||
vxworks
|
||||
-------
|
||||
gcc - GNU C
|
||||
diab - Wind River Compiler
|
||||
|
||||
sunos
|
||||
-----
|
||||
gcc - GNU C
|
||||
@@ -923,6 +929,13 @@ HARBOUR
|
||||
win-make
|
||||
---
|
||||
|
||||
--- VxWorks 6.8 (requires preceding build for Windows target)
|
||||
wrenv -p vxworks-6.8
|
||||
set HB_COMPILER=gcc
|
||||
set HB_CCPOSTFIX=pentium
|
||||
win-make
|
||||
---
|
||||
|
||||
--8<--
|
||||
rem ; Add these *before* above sample scripts to configure 3rd party dependencies.
|
||||
rem When using MSYS or Cygwin shell you'll have to use forward slashes and
|
||||
@@ -1258,6 +1271,8 @@ HARBOUR
|
||||
x win -> dos/watcom x86
|
||||
x win -> os2/watcom x86
|
||||
x win -> linux/watcom x86
|
||||
x win -> vxworks/gcc (CPU cross-builds possible: x86, arm, coldfire, mips, ppc)
|
||||
x win -> vxworks/diab (CPU cross-builds possible)
|
||||
dos -> dos/djgpp x86
|
||||
dos -> dos/watcom x86
|
||||
x dos -> win/watcom x86
|
||||
@@ -1282,6 +1297,8 @@ HARBOUR
|
||||
x linux -> os2/watcom x86
|
||||
x linux -> dos/watcom x86
|
||||
x linux -> dos/djgpp x86
|
||||
x linux -> vxworks/gcc (CPU cross-builds possible: x86, arm, coldfire, mips, ppc)
|
||||
x linux -> vxworks/diab (CPU cross-builds possible)
|
||||
bsd -> bsd/gcc (CPU cross-builds possible)
|
||||
bsd -> bsd/clang (CPU cross-builds possible)
|
||||
x bsd -> wce/mingwarm arm
|
||||
@@ -1309,6 +1326,8 @@ HARBOUR
|
||||
x sunos -> wce/mingw x86
|
||||
x sunos -> win/mingw x86
|
||||
x sunos -> dos/djgpp x86
|
||||
x sunos -> vxworks/gcc (CPU cross-builds possible: x86, arm, coldfire, mips, ppc)
|
||||
x sunos -> vxworks/diab (CPU cross-builds possible)
|
||||
|
||||
Leading 'x' marks cross-platform scenarios.
|
||||
|
||||
|
||||
@@ -545,6 +545,9 @@ ifeq ($(HB_PLATFORM),)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(findstring vxworks,$(WIND_PLATFORM)),)
|
||||
HB_PLATFORM := vxworks
|
||||
endif
|
||||
ifneq ($(HB_PLATFORM),)
|
||||
HB_PLAT_AUTO := (autodetected)
|
||||
endif
|
||||
|
||||
57
harbour/config/vxworks/diab.mk
Normal file
57
harbour/config/vxworks/diab.mk
Normal file
@@ -0,0 +1,57 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ifeq ($(HB_CMP),)
|
||||
ifeq ($(HB_BUILD_MODE),cpp)
|
||||
HB_CMP := dplus
|
||||
else
|
||||
HB_CMP := dcc
|
||||
endif
|
||||
endif
|
||||
|
||||
OBJ_EXT := .o
|
||||
LIB_PREF := lib
|
||||
LIB_EXT := .a
|
||||
|
||||
HB_DYN_COPT := -DHB_DYNLIB -Xcode-relative-far
|
||||
|
||||
CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)
|
||||
CC_IN := -c
|
||||
CC_OUT := -o
|
||||
|
||||
CFLAGS += -I. -I$(HB_INC_COMPILE)
|
||||
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Xlint
|
||||
else
|
||||
CFLAGS += -W
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
CFLAGS += -XO level-3
|
||||
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,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),-l$(lib))
|
||||
|
||||
LDFLAGS += $(LIBPATHS)
|
||||
|
||||
AR := $(HB_CCPREFIX)ar$(HB_CCPOSTFIX)
|
||||
AR_RULE = ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $(^F) $(ARSTRIP) ) || ( $(RM) $(LIB_DIR)/$@ && $(FALSE) )
|
||||
|
||||
DY := $(CC)
|
||||
DFLAGS += -shared $(LIBPATHS)
|
||||
DY_OUT := -o$(subst x,x, )
|
||||
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib))
|
||||
|
||||
DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2)
|
||||
|
||||
include $(TOP)$(ROOT)config/rules.mk
|
||||
80
harbour/config/vxworks/gcc.mk
Normal file
80
harbour/config/vxworks/gcc.mk
Normal file
@@ -0,0 +1,80 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ifeq ($(HB_CMP),)
|
||||
ifeq ($(HB_BUILD_MODE),cpp)
|
||||
HB_CMP := g++
|
||||
else
|
||||
HB_CMP := cc
|
||||
endif
|
||||
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
|
||||
|
||||
CFLAGS += -mrtp
|
||||
LDFLAGS += -mrtp
|
||||
DFLAGS += -mrtp
|
||||
|
||||
CFLAGS += -I. -I$(HB_INC_COMPILE)
|
||||
CFLAGS += -I$(WIND_USR)/h -I$(WIND_USR)/h/wrn/coreip
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CFLAGS += -D_C99 -D_HAS_C9X
|
||||
# ?
|
||||
CFLAGS += -D_VX_TOOL_FAMILY=gnu -D_VX_TOOL=gnu
|
||||
CFLAGS += -D_VX_CPU=_VX_SIMPENTIUM
|
||||
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -W
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(HB_BUILD_DEBUG),yes)
|
||||
CFLAGS += -g
|
||||
endif
|
||||
|
||||
LD := $(CC)
|
||||
LD_OUT := -o
|
||||
|
||||
LDLIBPATHS := $(foreach dir,$(LIB_DIR) $(SYSLIBPATHS_BIN),-L$(dir))
|
||||
DLIBPATHS := $(foreach dir,$(LIB_DIR) $(SYSLIBPATHS_DYN),-L$(dir))
|
||||
|
||||
LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),-l$(lib))
|
||||
|
||||
LDFLAGS += $(LDLIBPATHS)
|
||||
|
||||
AR := $(HB_CCPREFIX)ar$(HB_CCPOSTFIX)
|
||||
AR_RULE = ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $(^F) $(ARSTRIP) ) || ( $(RM) $(LIB_DIR)/$@ && $(FALSE) )
|
||||
|
||||
DY := $(CC)
|
||||
DFLAGS += -shared $(DLIBPATHS)
|
||||
DY_OUT := -o$(subst x,x, )
|
||||
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib))
|
||||
|
||||
# NOTE: The empty line directly before 'endef' HAVE TO exist!
|
||||
define dynlib_object
|
||||
@$(ECHO) $(ECHOQUOTE)INPUT($(subst \,/,$(file)))$(ECHOQUOTE) >> __dyn__.tmp
|
||||
|
||||
endef
|
||||
define create_dynlib
|
||||
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
|
||||
$(foreach file,$^,$(dynlib_object))
|
||||
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ __dyn__.tmp $(DLIBS) $(DYSTRIP)
|
||||
endef
|
||||
|
||||
DY_RULE = $(create_dynlib)
|
||||
|
||||
include $(TOP)$(ROOT)config/rules.mk
|
||||
17
harbour/config/vxworks/global.mk
Normal file
17
harbour/config/vxworks/global.mk
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
all : first
|
||||
|
||||
BIN_EXT := .vxe
|
||||
DYN_EXT := .so
|
||||
DYN_PREF := lib
|
||||
|
||||
ifneq ($(filter $(HB_BUILD_STRIP),all lib),)
|
||||
ARSTRIP = && strip$(HB_CCPOSTFIX) $(LIB_DIR)/$@
|
||||
endif
|
||||
ifneq ($(filter $(HB_BUILD_STRIP),all bin),)
|
||||
LDSTRIP := -s
|
||||
DYSTRIP := -s
|
||||
endif
|
||||
8
harbour/config/vxworks/libs.mk
Normal file
8
harbour/config/vxworks/libs.mk
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
SYSLIBPATHS :=
|
||||
|
||||
SYSLIBPATHS_BIN := $(WIND_BASE)/target/lib/usr/lib/simpentium/SIMPENTIUM/common
|
||||
SYSLIBPATHS_DYN := $(WIND_BASE)/target/lib/usr/lib/simpentium/SIMPENTIUM/common/PIC
|
||||
@@ -64,7 +64,7 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined( HB_OS_UNIX )
|
||||
#if defined( HB_OS_UNIX ) && !defined( HB_OS_VXWORKS )
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
@@ -139,7 +139,7 @@ HB_BOOL hb_OutDebugName( PHB_ITEM pName )
|
||||
{
|
||||
HB_BOOL bRet;
|
||||
|
||||
#if defined( HB_OS_UNIX )
|
||||
#if defined( HB_OS_UNIX ) && !defined( HB_OS_VXWORKS )
|
||||
if( s_iDebugFd == 0 && pName != NULL)
|
||||
{
|
||||
hb_strncpy( s_szDebugName, hb_itemGetCPtr( pName ), sizeof( s_szDebugName ) - 1 );
|
||||
@@ -166,7 +166,7 @@ HB_BOOL hb_OutDebugName( PHB_ITEM pName )
|
||||
|
||||
void hb_OutDebug( const char * szMsg, HB_SIZE nMsgLen )
|
||||
{
|
||||
#if defined( HB_OS_UNIX )
|
||||
#if defined( HB_OS_UNIX ) && !defined( HB_OS_VXWORKS )
|
||||
int iStatus, iPid;
|
||||
|
||||
/* Are we under X? */
|
||||
@@ -192,12 +192,12 @@ void hb_OutDebug( const char * szMsg, HB_SIZE nMsgLen )
|
||||
}
|
||||
}
|
||||
|
||||
if( s_iDebugFd > 0 && HB_ISCHAR(1) )
|
||||
if( s_iDebugFd > 0 && HB_ISCHAR( 1 ) )
|
||||
{
|
||||
fd_set wrds;
|
||||
struct timeval tv = { 0, 100000 }; /* wait each time a tenth of second */
|
||||
FD_ZERO(&wrds);
|
||||
FD_SET(s_iDebugFd, &wrds);
|
||||
FD_ZERO( &wrds );
|
||||
FD_SET( s_iDebugFd, &wrds );
|
||||
|
||||
if( select( s_iDebugFd + 1, NULL, &wrds, NULL, &tv ) > 0 )
|
||||
{
|
||||
@@ -205,8 +205,8 @@ void hb_OutDebug( const char * szMsg, HB_SIZE nMsgLen )
|
||||
{
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 100000;
|
||||
FD_ZERO(&wrds);
|
||||
FD_SET(s_iDebugFd, &wrds);
|
||||
FD_ZERO( &wrds );
|
||||
FD_SET( s_iDebugFd, &wrds );
|
||||
if( select( s_iDebugFd + 1, NULL, &wrds, NULL, &tv ) > 0 )
|
||||
{
|
||||
if( write( s_iDebugFd, "\n", 1 ) != 1 ) {}
|
||||
|
||||
@@ -217,10 +217,12 @@ static void s_signalHandler( int sig, siginfo_t * info, void * v )
|
||||
#endif
|
||||
{
|
||||
hb_arraySetNI( pRet, HB_SERVICE_OSSUBSIG, info->si_code );
|
||||
#if ! defined( HB_OS_VXWORKS )
|
||||
hb_arraySetNI( pRet, HB_SERVICE_OSERROR, info->si_errno );
|
||||
hb_arraySetPtr( pRet, HB_SERVICE_ADDRESS, ( void * ) info->si_addr );
|
||||
hb_arraySetNI( pRet, HB_SERVICE_PROCESS, info->si_pid );
|
||||
hb_arraySetNI( pRet, HB_SERVICE_UID, info->si_uid );
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -764,7 +766,7 @@ HB_FUNC( HB_STARTSERVICE )
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HB_OS_UNIX
|
||||
#if defined( HB_OS_UNIX ) && ! defined( HB_OS_VXWORKS )
|
||||
{
|
||||
int pid;
|
||||
|
||||
@@ -985,7 +987,9 @@ HB_FUNC( HB_SIGNALDESC )
|
||||
case FPE_FLTOVF: hb_retc_const( "Floating point: floating point overflow"); return;
|
||||
case FPE_FLTUND: hb_retc_const( "Floating point: floating point underflow"); return;
|
||||
case FPE_FLTRES: hb_retc_const( "Floating point: floating point inexact result"); return;
|
||||
#if ! defined( HB_OS_VXWORKS )
|
||||
case FPE_FLTINV: hb_retc_const( "Floating point: floating point invalid operation"); return;
|
||||
#endif
|
||||
#if ! defined( HB_OS_DARWIN )
|
||||
case FPE_FLTSUB: hb_retc_const( "Floating point: subscript out of range"); return;
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
static HANDLE s_RegHandle;
|
||||
|
||||
#elif ( defined( HB_OS_UNIX ) || defined( HB_OS_LINUX ) ) && !defined( __WATCOMC__ )
|
||||
#elif ( defined( HB_OS_UNIX ) || defined( HB_OS_LINUX ) ) && !defined( __WATCOMC__ ) && !defined( HB_OS_VXWORKS )
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
@@ -42,7 +42,7 @@ HB_FUNC( HB_SYSLOGOPEN )
|
||||
s_RegHandle = NULL;
|
||||
hb_retl( HB_FALSE );
|
||||
#endif
|
||||
#elif defined( HB_OS_UNIX ) && !defined( __WATCOMC__ )
|
||||
#elif defined( HB_OS_UNIX ) && !defined( __WATCOMC__ ) && !defined( HB_OS_VXWORKS )
|
||||
openlog( hb_parcx( 1 ), LOG_NDELAY | LOG_NOWAIT | LOG_PID, LOG_USER );
|
||||
hb_retl( HB_TRUE );
|
||||
#else
|
||||
@@ -63,7 +63,7 @@ HB_FUNC( HB_SYSLOGCLOSE )
|
||||
else
|
||||
#endif
|
||||
hb_retl( HB_FALSE );
|
||||
#elif defined( HB_OS_UNIX ) && !defined( __WATCOMC__ )
|
||||
#elif defined( HB_OS_UNIX ) && !defined( __WATCOMC__ ) && !defined( HB_OS_VXWORKS )
|
||||
closelog();
|
||||
hb_retl( HB_TRUE );
|
||||
#else
|
||||
@@ -105,7 +105,7 @@ HB_FUNC( HB_SYSLOGMESSAGE )
|
||||
else
|
||||
#endif
|
||||
hb_retl( HB_FALSE );
|
||||
#elif defined( HB_OS_UNIX ) && !defined( __WATCOMC__ )
|
||||
#elif defined( HB_OS_UNIX ) && !defined( __WATCOMC__ ) && !defined( HB_OS_VXWORKS )
|
||||
int logval;
|
||||
|
||||
switch( hb_parni( 2 ) )
|
||||
|
||||
9
harbour/external/jpeg/jmorecfg.h
vendored
9
harbour/external/jpeg/jmorecfg.h
vendored
@@ -138,7 +138,9 @@ typedef unsigned char UINT8;
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
typedef char UINT8;
|
||||
#else /* not CHAR_IS_UNSIGNED */
|
||||
#ifndef __INCvxTypesOldh /* VxWorks defines this */
|
||||
typedef short UINT8;
|
||||
#endif
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
@@ -147,7 +149,9 @@ typedef short UINT8;
|
||||
#ifdef HAVE_UNSIGNED_SHORT
|
||||
typedef unsigned short UINT16;
|
||||
#else /* not HAVE_UNSIGNED_SHORT */
|
||||
#ifndef __INCvxTypesOldh /* VxWorks defines this */
|
||||
typedef unsigned int UINT16;
|
||||
#endif
|
||||
#endif /* HAVE_UNSIGNED_SHORT */
|
||||
|
||||
/* INT16 must hold at least the values -32768..32767. */
|
||||
@@ -162,11 +166,13 @@ typedef short INT16;
|
||||
#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
|
||||
#ifndef _BASETSD_H /* MinGW is slightly different */
|
||||
#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */
|
||||
#ifndef __INCvxTypesOldh /* VxWorks defines this */
|
||||
typedef long INT32;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Datatype used for image dimensions. The JPEG standard only supports
|
||||
* images up to 64K*64K due to 16-bit fields in SOF markers. Therefore
|
||||
@@ -190,6 +196,9 @@ typedef unsigned int JDIMENSION;
|
||||
/* a function called through method pointers: */
|
||||
#define METHODDEF(type) static type
|
||||
/* a function used only in its module: */
|
||||
#ifdef __INCvxTypesOldh /* VxWorks defines this */
|
||||
#undef LOCAL
|
||||
#endif
|
||||
#define LOCAL(type) static type
|
||||
/* a function referenced thru EXTERNs: */
|
||||
#define GLOBAL(type) type
|
||||
|
||||
4
harbour/external/pcre/Makefile
vendored
4
harbour/external/pcre/Makefile
vendored
@@ -41,6 +41,10 @@ ifneq ($(HB_HAS_PCRE_LOCAL),)
|
||||
|
||||
ifneq ($(filter $(HB_COMPILER),bcc msvc msvc64 msvcia64 icc iccia64 djgpp),)
|
||||
HB_CFLAGS += -DHAVE_INTTYPES_H=0
|
||||
else
|
||||
ifneq ($(filter $(HB_PLATFORM),vxworks),)
|
||||
HB_CFLAGS += -DHAVE_INTTYPES_H=0
|
||||
endif
|
||||
endif
|
||||
|
||||
HB_CFLAGS += -DHAVE_CONFIG_H
|
||||
|
||||
1
harbour/external/zlib/inflate.c
vendored
1
harbour/external/zlib/inflate.c
vendored
@@ -408,6 +408,7 @@ unsigned out;
|
||||
/* Macros for inflate(): */
|
||||
|
||||
/* check function to use adler32() for zlib or crc32() for gzip */
|
||||
#undef UPDATE /* VxWorks defines it */
|
||||
#ifdef GUNZIP
|
||||
# define UPDATE(check, buf, len) \
|
||||
(state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
|
||||
|
||||
@@ -135,6 +135,10 @@ HB_EXTERN_BEGIN
|
||||
#define HB_FA_RWXG ( HB_FA_RGRP | HB_FA_WGRP | HB_FA_XGRP )
|
||||
#define HB_FA_RWXO ( HB_FA_ROTH | HB_FA_WOTH | HB_FA_XOTH )
|
||||
|
||||
#if defined( HB_OS_VXWORKS ) && ! defined( S_ISVTX )
|
||||
# define S_ISVTX 0
|
||||
#endif
|
||||
|
||||
/* macros to convert Harbour attributes to POSIX ones */
|
||||
#define HB_FA_POSIX_SID(a) ( ( ( ( a ) & HB_FA_SVTX ) ? S_ISVTX : 0 ) | \
|
||||
( ( ( a ) & HB_FA_SGID ) ? S_ISGID : 0 ) | \
|
||||
|
||||
@@ -73,7 +73,8 @@
|
||||
( __DJGPP__ > 2 || ( __DJGPP__ == 2 && __DJGPP_MINOR__ >= 4 ) ) ) || \
|
||||
defined( HB_OS_LINUX ) || defined( HB_OS_DARWIN ) || \
|
||||
defined( HB_OS_BSD ) || defined( HB_OS_SUNOS ) || \
|
||||
defined( HB_OS_BEOS ) || defined( HB_OS_QNX ) ) )
|
||||
defined( HB_OS_BEOS ) || defined( HB_OS_QNX ) || \
|
||||
defined( HB_OS_VXWORKS ) ) )
|
||||
#include <stdint.h>
|
||||
/* workaround for BCC 5.8 bug */
|
||||
#if ( defined( __BORLANDC__ ) && __BORLANDC__ >= 1410 )
|
||||
|
||||
@@ -398,6 +398,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HB_OS_VXWORKS
|
||||
#if defined( __VXWORKS__ ) || defined( __vxworks )
|
||||
#define HB_OS_VXWORKS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HB_OS_UNIX
|
||||
#if defined( HB_OS_LINUX ) || \
|
||||
defined( HB_OS_DARWIN ) || \
|
||||
@@ -405,11 +411,16 @@
|
||||
defined( HB_OS_SUNOS ) || \
|
||||
defined( HB_OS_HPUX ) || \
|
||||
defined( HB_OS_QNX ) || \
|
||||
defined( HB_OS_VXWORKS ) || \
|
||||
defined( HB_OS_BEOS )
|
||||
#define HB_OS_UNIX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined( HB_OS_VXWORKS )
|
||||
#define HB_NO_FNMATCH
|
||||
#endif
|
||||
|
||||
/* ***********************************************************************
|
||||
* Operating system specific definitions
|
||||
*/
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
#elif defined( HB_OS_LINUX ) || defined( HB_OS_DARWIN ) || \
|
||||
defined( HB_OS_SUNOS ) || defined( HB_OS_HPUX ) || \
|
||||
defined( HB_OS_BSD ) || defined( HB_OS_BEOS ) || \
|
||||
defined( HB_OS_QNX )
|
||||
defined( HB_OS_QNX ) || defined( HB_OS_VXWORKS )
|
||||
# include <pthread.h>
|
||||
# define HB_PTHREAD_API
|
||||
#elif defined( HB_OS_WIN )
|
||||
|
||||
@@ -929,3 +929,32 @@ long hb_timeUTCOffset( void ) /* in seconds */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined( HB_OS_VXWORKS )
|
||||
|
||||
/* NOTE: This function is declared, but not present in
|
||||
libs in VxWorks 6.8. So here we emulate its
|
||||
base functionality. [vszakats] */
|
||||
|
||||
int gettimeofday( struct timeval * tv, void * tz )
|
||||
{
|
||||
int ret;
|
||||
struct timespec tp;
|
||||
|
||||
HB_SYMBOL_UNUSED( tz );
|
||||
|
||||
if( ( ret = clock_gettime( CLOCK_REALTIME, &tp ) ) == 0 )
|
||||
{
|
||||
tv->tv_sec = tp.tv_sec;
|
||||
tv->tv_usec = ( tp.tv_nsec + 500 ) / 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
tv->tv_sec = 0;
|
||||
tv->tv_usec = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -248,7 +248,9 @@ HB_FATTR hb_fsAttrFromRaw( HB_FATTR raw_attr )
|
||||
if( S_ISCHR( raw_attr ) ) ulAttr |= HB_FA_CHRDEVICE;
|
||||
if( S_ISBLK( raw_attr ) ) ulAttr |= HB_FA_BLKDEVICE;
|
||||
if( S_ISFIFO( raw_attr ) ) ulAttr |= HB_FA_FIFO;
|
||||
#if ! defined( HB_OS_VXWORKS )
|
||||
if( S_ISSOCK( raw_attr ) ) ulAttr |= HB_FA_SOCKET;
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ HB_BOOL hb_setenv( const char * szName, const char * szValue )
|
||||
defined( __WATCOMC__ ) || defined( __DJGPP__ ) || \
|
||||
defined( HB_OS_SUNOS ) || defined( HB_OS_BSD ) || \
|
||||
defined( HB_OS_DARWIN ) || defined( HB_OS_BEOS ) || \
|
||||
defined( HB_OS_QNX )
|
||||
defined( HB_OS_QNX ) || defined( HB_OS_VXWORKS )
|
||||
|
||||
if( szValue )
|
||||
return setenv( szName, szValue, 1 ) == 0;
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
#if defined( HB_OS_WIN )
|
||||
#include <windows.h>
|
||||
#elif defined( HB_OS_UNIX ) && ! defined( __WATCOMC__ )
|
||||
#elif defined( HB_OS_UNIX ) && ! defined( __WATCOMC__ ) && ! defined( HB_OS_VXWORKS )
|
||||
#include <syslog.h>
|
||||
#endif
|
||||
|
||||
@@ -213,7 +213,7 @@ static void hb_tracelog_( int level, const char * file, int line, const char * p
|
||||
if( s_sysout )
|
||||
{
|
||||
#if ( defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) ) || \
|
||||
( defined( HB_OS_UNIX ) && ! defined( __WATCOMC__ ) )
|
||||
( defined( HB_OS_UNIX ) && ! defined( __WATCOMC__ ) && ! defined( HB_OS_VXWORKS ) )
|
||||
|
||||
char message[ 1024 ];
|
||||
|
||||
|
||||
@@ -54,7 +54,9 @@
|
||||
#include "hbdate.h"
|
||||
|
||||
#if defined( HB_OS_UNIX )
|
||||
#include <sys/times.h>
|
||||
#if ! defined( HB_OS_VXWORKS )
|
||||
#include <sys/times.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if defined( HB_OS_OS2 )
|
||||
@@ -102,7 +104,7 @@ double hb_secondsCPU( int n )
|
||||
if( ( n < 1 || n > 3 ) && ( n < 11 || n > 13 ) )
|
||||
n = 3;
|
||||
|
||||
#if defined( HB_OS_UNIX )
|
||||
#if defined( HB_OS_UNIX ) && ! defined( HB_OS_VXWORKS )
|
||||
{
|
||||
struct tms tm;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
#if defined( HB_OS_UNIX )
|
||||
# include <unistd.h>
|
||||
# include <sys/types.h>
|
||||
# if defined( __WATCOMC__ ) || defined( __CEGCC__ )
|
||||
# if defined( __WATCOMC__ ) || defined( __CEGCC__ ) || defined( HB_OS_VXWORKS )
|
||||
# include <sys/stat.h>
|
||||
# elif defined( HB_OS_DARWIN )
|
||||
# include <sys/param.h>
|
||||
@@ -236,7 +236,7 @@ HB_FUNC( DISKSPACE )
|
||||
|
||||
bError = HB_FALSE;
|
||||
#else
|
||||
#if defined( HB_OS_DARWIN )
|
||||
#if defined( HB_OS_DARWIN ) || defined( HB_OS_VXWORKS )
|
||||
struct statfs st;
|
||||
bError = statfs( szName, &st ) != 0;
|
||||
#else
|
||||
@@ -245,9 +245,11 @@ HB_FUNC( DISKSPACE )
|
||||
#endif
|
||||
if( !bError )
|
||||
{
|
||||
#if ! defined( HB_OS_VXWORKS )
|
||||
if( getuid() == 0 )
|
||||
dSpace = ( double ) st.f_bfree * ( double ) st.f_bsize;
|
||||
else
|
||||
#endif
|
||||
dSpace = ( double ) st.f_bavail * ( double ) st.f_bsize;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -58,7 +58,11 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#elif defined( HB_OS_UNIX ) && !( defined( __WATCOMC__ ) || defined( __CEGCC__ ) )
|
||||
#include <sys/statvfs.h>
|
||||
#if defined( HB_OS_VXWORKS )
|
||||
#include <sys/stat.h>
|
||||
#else
|
||||
#include <sys/statvfs.h>
|
||||
#endif
|
||||
#endif
|
||||
#if defined( HB_OS_WIN )
|
||||
#include <windows.h>
|
||||
@@ -355,7 +359,7 @@ HB_FUNC( HB_DISKSPACE )
|
||||
}
|
||||
#elif defined( HB_OS_UNIX ) && !( defined( __WATCOMC__ ) || defined( __CEGCC__ ) )
|
||||
{
|
||||
#if defined( HB_OS_DARWIN )
|
||||
#if defined( HB_OS_DARWIN ) || defined( HB_OS_VXWORKS )
|
||||
struct statfs sf;
|
||||
#else
|
||||
struct statvfs sf;
|
||||
@@ -364,7 +368,7 @@ HB_FUNC( HB_DISKSPACE )
|
||||
|
||||
szPath = hb_fsNameConv( szPath, &pszFree );
|
||||
|
||||
#if defined( HB_OS_DARWIN )
|
||||
#if defined( HB_OS_DARWIN ) || defined( HB_OS_VXWORKS )
|
||||
if( statfs( szPath, &sf ) == 0 )
|
||||
#else
|
||||
if( statvfs( szPath, &sf ) == 0 )
|
||||
|
||||
@@ -598,7 +598,7 @@ HB_FHANDLE hb_fsPOpen( const char * pFilename, const char * pMode )
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_fsPOpen(%p, %s)", pFilename, pMode));
|
||||
|
||||
#if defined( HB_OS_UNIX )
|
||||
#if defined( HB_OS_UNIX ) && !defined( HB_OS_VXWORKS )
|
||||
{
|
||||
HB_FHANDLE hPipeHandle[ 2 ], hNullHandle;
|
||||
pid_t pid;
|
||||
@@ -1722,7 +1722,7 @@ HB_SIZE hb_fsReadAt( HB_FHANDLE hFileHandle, void * pBuff, HB_SIZE nCount, HB_FO
|
||||
|
||||
hb_vmUnlock();
|
||||
|
||||
#if defined( HB_OS_UNIX ) && !defined( __WATCOMC__ )
|
||||
#if defined( HB_OS_UNIX ) && !defined( __WATCOMC__ ) && !defined( HB_OS_VXWORKS )
|
||||
# if defined( HB_USE_LARGEFILE64 )
|
||||
nRead = pread64( hFileHandle, pBuff, nCount, nOffset );
|
||||
# else
|
||||
@@ -1847,7 +1847,7 @@ HB_SIZE hb_fsWriteAt( HB_FHANDLE hFileHandle, const void * pBuff, HB_SIZE nCount
|
||||
|
||||
hb_vmUnlock();
|
||||
|
||||
#if defined( HB_OS_UNIX ) && !defined( __WATCOMC__ )
|
||||
#if defined( HB_OS_UNIX ) && !defined( __WATCOMC__ ) && !defined( HB_OS_VXWORKS )
|
||||
# if defined( HB_USE_LARGEFILE64 )
|
||||
nWritten = pwrite64( hFileHandle, pBuff, nCount, nOffset );
|
||||
# else
|
||||
|
||||
@@ -70,15 +70,23 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if ( defined( HB_OS_UNIX ) && !defined( HB_OS_VXWORKS ) ) || defined( __DJGPP__ )
|
||||
# if !defined( HB_HAS_TERMIOS )
|
||||
# define HB_HAS_TERMIOS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#include <unistd.h> /* read() function requires it */
|
||||
#include <termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
# if defined( HB_HAS_TERMIOS )
|
||||
# include <unistd.h> /* read() function requires it */
|
||||
# include <termios.h>
|
||||
# include <sys/ioctl.h>
|
||||
# include <signal.h>
|
||||
# include <errno.h>
|
||||
# include <sys/time.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/wait.h>
|
||||
# endif
|
||||
#else
|
||||
# if defined( HB_OS_WIN )
|
||||
# include <windows.h>
|
||||
@@ -121,7 +129,7 @@ static int s_iOutBufSize = 0;
|
||||
static int s_iOutBufIndex = 0;
|
||||
static char * s_sOutBuf;
|
||||
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#if defined( HB_HAS_TERMIOS )
|
||||
|
||||
static volatile HB_BOOL s_fRestTTY = HB_FALSE;
|
||||
static struct termios s_saved_TIO, s_curr_TIO;
|
||||
@@ -282,7 +290,7 @@ static void hb_gt_pca_AnsiGetCurPos( int * iRow, int * iCol )
|
||||
break;
|
||||
else
|
||||
{
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#if defined( HB_HAS_TERMIOS )
|
||||
struct timeval tv;
|
||||
fd_set rdfds;
|
||||
int iMilliSec;
|
||||
@@ -484,7 +492,7 @@ static void hb_gt_pca_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil
|
||||
HB_GTSUPER_INIT( pGT, hFilenoStdin, hFilenoStdout, hFilenoStderr );
|
||||
|
||||
/* SA_NOCLDSTOP in #if is a hack to detect POSIX compatible environment */
|
||||
#if ( defined( HB_OS_UNIX ) || defined( __DJGPP__ ) ) && \
|
||||
#if defined( HB_HAS_TERMIOS ) && \
|
||||
defined( SA_NOCLDSTOP )
|
||||
s_fRestTTY = HB_FALSE;
|
||||
if( s_bStdinConsole )
|
||||
@@ -566,7 +574,7 @@ static void hb_gt_pca_Exit( PHB_GT pGT )
|
||||
|
||||
HB_GTSUPER_EXIT( pGT );
|
||||
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#if defined( HB_HAS_TERMIOS )
|
||||
if( s_fRestTTY )
|
||||
tcsetattr( s_hFilenoStdin, TCSANOW, &s_saved_TIO );
|
||||
#endif
|
||||
@@ -613,7 +621,7 @@ static int hb_gt_pca_ReadKey( PHB_GT pGT, int iEventMask )
|
||||
ch = hb_gt_dos_keyCodeTranslate( ch );
|
||||
if( ch > 0 && ch <= 255 )
|
||||
ch = s_keyTransTbl[ ch ];
|
||||
#elif defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#elif defined( HB_HAS_TERMIOS )
|
||||
{
|
||||
struct timeval tv;
|
||||
fd_set rfds;
|
||||
@@ -746,7 +754,7 @@ static HB_BOOL hb_gt_pca_Suspend( PHB_GT pGT )
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_pca_Suspend(%p)", pGT ) );
|
||||
|
||||
HB_SYMBOL_UNUSED( pGT );
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#if defined( HB_HAS_TERMIOS )
|
||||
if( s_fRestTTY )
|
||||
{
|
||||
tcsetattr( s_hFilenoStdin, TCSANOW, &s_saved_TIO );
|
||||
@@ -762,7 +770,7 @@ static HB_BOOL hb_gt_pca_Resume( PHB_GT pGT )
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_pca_Resume(%p)", pGT ) );
|
||||
|
||||
HB_SYMBOL_UNUSED( pGT );
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#if defined( HB_HAS_TERMIOS )
|
||||
if( s_fRestTTY )
|
||||
{
|
||||
tcsetattr( s_hFilenoStdin, TCSANOW, &s_curr_TIO );
|
||||
|
||||
@@ -62,15 +62,23 @@
|
||||
#include "hbdate.h"
|
||||
#include "hb_io.h"
|
||||
|
||||
#if ( defined( HB_OS_UNIX ) && !defined( HB_OS_VXWORKS ) ) || defined( __DJGPP__ )
|
||||
# if !defined( HB_HAS_TERMIOS )
|
||||
# define HB_HAS_TERMIOS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
# if defined( HB_HAS_TERMIOS )
|
||||
# include <unistd.h>
|
||||
# include <termios.h>
|
||||
# include <sys/ioctl.h>
|
||||
# include <signal.h>
|
||||
# include <errno.h>
|
||||
# include <sys/time.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/wait.h>
|
||||
# endif
|
||||
#else
|
||||
# if defined( HB_OS_WIN )
|
||||
# include <windows.h>
|
||||
@@ -115,7 +123,7 @@ typedef struct _HB_GTSTD
|
||||
PHB_CODEPAGE cdpHost;
|
||||
HB_BYTE keyTransTbl[ 256 ];
|
||||
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#if defined( HB_HAS_TERMIOS )
|
||||
struct termios saved_TIO;
|
||||
struct termios curr_TIO;
|
||||
HB_BOOL fRestTTY;
|
||||
@@ -126,7 +134,7 @@ typedef struct _HB_GTSTD
|
||||
} HB_GTSTD, * PHB_GTSTD;
|
||||
|
||||
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#if defined( HB_HAS_TERMIOS )
|
||||
|
||||
static volatile HB_BOOL s_fRestTTY = HB_FALSE;
|
||||
|
||||
@@ -223,7 +231,7 @@ static void hb_gt_std_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil
|
||||
HB_GTSUPER_INIT( pGT, hFilenoStdin, hFilenoStdout, hFilenoStderr );
|
||||
|
||||
/* SA_NOCLDSTOP in #if is a hack to detect POSIX compatible environment */
|
||||
#if ( defined( HB_OS_UNIX ) || defined( __DJGPP__ ) ) && \
|
||||
#if defined( HB_HAS_TERMIOS ) && \
|
||||
defined( SA_NOCLDSTOP )
|
||||
|
||||
if( pGTSTD->fStdinConsole )
|
||||
@@ -311,7 +319,7 @@ static void hb_gt_std_Exit( PHB_GT pGT )
|
||||
while( ++pGTSTD->iRow <= iRow )
|
||||
hb_gt_std_newLine( pGTSTD );
|
||||
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#if defined( HB_HAS_TERMIOS )
|
||||
if( pGTSTD->fRestTTY )
|
||||
tcsetattr( pGTSTD->hStdin, TCSANOW, &pGTSTD->saved_TIO );
|
||||
#endif
|
||||
@@ -336,7 +344,7 @@ static int hb_gt_std_ReadKey( PHB_GT pGT, int iEventMask )
|
||||
|
||||
pGTSTD = HB_GTSTD_GET( pGT );
|
||||
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#if defined( HB_HAS_TERMIOS )
|
||||
{
|
||||
struct timeval tv;
|
||||
fd_set rfds;
|
||||
@@ -474,7 +482,7 @@ static HB_BOOL hb_gt_std_Suspend( PHB_GT pGT )
|
||||
{
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Suspend(%p)", pGT ) );
|
||||
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#if defined( HB_HAS_TERMIOS )
|
||||
{
|
||||
PHB_GTSTD pGTSTD = HB_GTSTD_GET( pGT );
|
||||
if( pGTSTD->fRestTTY )
|
||||
@@ -490,7 +498,7 @@ static HB_BOOL hb_gt_std_Resume( PHB_GT pGT )
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Resume(%p)", pGT ) );
|
||||
|
||||
|
||||
#if defined( HB_OS_UNIX ) || defined( __DJGPP__ )
|
||||
#if defined( HB_HAS_TERMIOS )
|
||||
{
|
||||
PHB_GTSTD pGTSTD = HB_GTSTD_GET( pGT );
|
||||
if( pGTSTD->fRestTTY )
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
HB_GT_REQUEST( DOS )
|
||||
#elif defined( HB_OS_OS2 )
|
||||
HB_GT_REQUEST( OS2 )
|
||||
#elif defined( HB_OS_VXWORKS )
|
||||
HB_GT_REQUEST( STD )
|
||||
#elif defined( HB_OS_UNIX )
|
||||
HB_GT_REQUEST( TRM )
|
||||
#else
|
||||
|
||||
@@ -30,6 +30,9 @@ endif
|
||||
ifeq ($(HB_COMPILER),djgpp)
|
||||
HB_SUPPORTED := yes
|
||||
endif
|
||||
ifeq ($(HB_PLATFORM),vxworks)
|
||||
HB_SUPPORTED := no
|
||||
endif
|
||||
|
||||
ifeq ($(HB_SUPPORTED),yes)
|
||||
|
||||
|
||||
@@ -63,8 +63,14 @@
|
||||
#include "hbdate.h"
|
||||
|
||||
#if defined( HB_OS_UNIX ) && !defined( __WATCOMC__ ) /* || defined( __DJGPP__ ) */
|
||||
# if !defined( HB_HAS_TERMIOS )
|
||||
# define HB_HAS_TERMIOS
|
||||
# if defined( HB_OS_VXWORKS )
|
||||
# if !defined( HB_HAS_SIOLIB )
|
||||
# define HB_HAS_SIOLIB
|
||||
# endif
|
||||
# else
|
||||
# if !defined( HB_HAS_TERMIOS )
|
||||
# define HB_HAS_TERMIOS
|
||||
# endif
|
||||
# endif
|
||||
# if defined( HB_OS_SUNOS )
|
||||
# if !defined( BSD_COMP )
|
||||
@@ -84,6 +90,8 @@
|
||||
# include <sys/time.h>
|
||||
# include <sys/types.h>
|
||||
# endif
|
||||
#elif defined( HB_HAS_SIOLIB )
|
||||
# include <sioLib.h>
|
||||
#elif defined( HB_OS_WIN )
|
||||
# include <windows.h>
|
||||
#elif defined( HB_OS_OS2 )
|
||||
|
||||
@@ -306,7 +306,7 @@ static int hb_fsProcessExec( const char * pszFilename,
|
||||
iStdErr = dup( 2 );
|
||||
dup2( hStderr, 2 );
|
||||
}
|
||||
#if defined( HB_OS_UNIX )
|
||||
#if defined( HB_OS_UNIX ) && !defined( HB_OS_VXWORKS )
|
||||
{
|
||||
pid_t pid = fork();
|
||||
if( pid == 0 )
|
||||
@@ -506,7 +506,7 @@ HB_FHANDLE hb_fsProcessOpen( const char * pszFilename,
|
||||
CloseHandle( hPipes[ i ] );
|
||||
}
|
||||
}
|
||||
#elif defined( HB_OS_UNIX )
|
||||
#elif defined( HB_OS_UNIX ) && !defined( HB_OS_VXWORKS )
|
||||
{
|
||||
HB_BOOL fError = HB_FALSE;
|
||||
HB_FHANDLE hPipeIn [ 2 ] = { FS_ERROR, FS_ERROR },
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
#include "hbsocket.h"
|
||||
|
||||
#if defined( HB_OS_DOS ) && !defined( HB_HAS_WATT )
|
||||
#if ( defined( HB_OS_DOS ) && !defined( HB_HAS_WATT ) )
|
||||
# if !defined( HB_SOCKET_OFF )
|
||||
# define HB_SOCKET_OFF
|
||||
# endif
|
||||
@@ -125,7 +125,9 @@
|
||||
# endif
|
||||
# if !defined( __WATCOMC__ ) && !defined( HB_OS_BEOS )
|
||||
# define HB_HAS_INET6
|
||||
# define HB_HAS_INET6_ADDR_CONST
|
||||
# if !defined( HB_OS_VXWORKS )
|
||||
# define HB_HAS_INET6_ADDR_CONST
|
||||
# endif
|
||||
# endif
|
||||
# if defined( HB_OS_BEOS )
|
||||
# define HB_SOCKET_TRANSLATE_DOMAIN
|
||||
@@ -213,6 +215,9 @@
|
||||
# if defined( HB_OS_BEOS )
|
||||
# include <sys/sockio.h>
|
||||
# endif
|
||||
# if defined( HB_OS_VXWORKS )
|
||||
# include <sockLib.h>
|
||||
# endif
|
||||
# include <netdb.h>
|
||||
# include <netinet/in.h>
|
||||
# include <arpa/inet.h>
|
||||
@@ -3006,7 +3011,8 @@ PHB_ITEM hb_socketGetIFaces( int af, HB_BOOL fNoAliases )
|
||||
* of 'struct ifreq' and SIOCGIF*
|
||||
*/
|
||||
#if defined( SIOCGIFCONF ) && \
|
||||
!( defined( HB_OS_LINUX ) && defined( __WATCOMC__ ) )
|
||||
!( defined( HB_OS_LINUX ) && defined( __WATCOMC__ ) && \
|
||||
! defined( HB_OS_VXWORKS ) )
|
||||
struct ifconf ifc;
|
||||
struct ifreq * pifr;
|
||||
char * buf, * ptr;
|
||||
|
||||
@@ -92,7 +92,11 @@
|
||||
#elif defined( HB_OS_UNIX )
|
||||
|
||||
#if !defined( __WATCOMC__ )
|
||||
#include <pwd.h>
|
||||
#if defined( HB_OS_VXWORKS )
|
||||
#include <hostLib.h>
|
||||
#else
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
@@ -187,7 +191,7 @@ char * hb_username( void )
|
||||
{
|
||||
#if defined( HB_OS_UNIX ) || ( defined( HB_OS_OS2 ) && defined( __GNUC__ ) )
|
||||
|
||||
# if defined( __WATCOMC__ )
|
||||
# if defined( __WATCOMC__ ) || defined( HB_OS_VXWORKS )
|
||||
return hb_getenv( "USER" );
|
||||
# else
|
||||
struct passwd * pwd = getpwuid( getuid() );
|
||||
|
||||
@@ -330,7 +330,7 @@ HB_FUNC( HB_HCOPY )
|
||||
nStart = hb_parns( 3 );
|
||||
if( ! nStart )
|
||||
++nStart;
|
||||
nCount = HB_ISNUM( 4 ) ? hb_parns( 4 ) : nLen - nStart + 1;
|
||||
nCount = HB_ISNUM( 4 ) ? ( HB_SIZE ) hb_parns( 4 ) : nLen - nStart + 1;
|
||||
|
||||
while( nCount-- )
|
||||
{
|
||||
@@ -403,7 +403,7 @@ HB_FUNC( HB_HEVAL )
|
||||
nStart = hb_parns( 3 );
|
||||
if( ! nStart )
|
||||
++nStart;
|
||||
nCount = HB_ISNUM( 4 ) ? hb_parns( 4 ) : nLen - nStart + 1;
|
||||
nCount = HB_ISNUM( 4 ) ? ( HB_SIZE ) hb_parns( 4 ) : nLen - nStart + 1;
|
||||
|
||||
while( nCount-- )
|
||||
{
|
||||
@@ -442,7 +442,7 @@ HB_FUNC( HB_HSCAN )
|
||||
nStart = hb_parns( 3 );
|
||||
if( ! nStart )
|
||||
++nStart;
|
||||
nCount = HB_ISNUM( 4 ) ? hb_parns( 4 ) : nLen - nStart + 1;
|
||||
nCount = HB_ISNUM( 4 ) ? ( HB_SIZE ) hb_parns( 4 ) : nLen - nStart + 1;
|
||||
|
||||
if( HB_IS_BLOCK( pValue ) )
|
||||
{
|
||||
|
||||
@@ -111,7 +111,9 @@
|
||||
|
||||
#if defined( HB_OS_UNIX )
|
||||
# include <sys/time.h>
|
||||
# include <sys/times.h>
|
||||
# if ! defined( HB_OS_VXWORKS )
|
||||
# include <sys/times.h>
|
||||
# endif
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1127,7 +1127,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
cBin_CompPRG := "harbour" + l_cHBPOSTFIX
|
||||
|
||||
DO CASE
|
||||
CASE hbmk[ _HBMK_cPLAT ] $ "bsd|hpux|sunos|beos|qnx|linux" .OR. hbmk[ _HBMK_cPLAT ] == "darwin" /* Separated to avoid match with 'win' */
|
||||
CASE hbmk[ _HBMK_cPLAT ] $ "bsd|hpux|sunos|beos|qnx|vxworks|linux" .OR. hbmk[ _HBMK_cPLAT ] == "darwin" /* Separated to avoid match with 'win' */
|
||||
DO CASE
|
||||
CASE hbmk[ _HBMK_cPLAT ] == "linux"
|
||||
aCOMPSUP := { "gcc", "clang", "icc", "watcom", "sunpro", "open64" }
|
||||
@@ -1137,13 +1137,21 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
aCOMPSUP := { "gcc", "clang" }
|
||||
CASE hbmk[ _HBMK_cPLAT ] == "sunos"
|
||||
aCOMPSUP := { "gcc", "sunpro" }
|
||||
CASE hbmk[ _HBMK_cPLAT ] == "vxworks"
|
||||
aCOMPSUP := { "gcc", "diab" }
|
||||
OTHERWISE
|
||||
aCOMPSUP := { "gcc" }
|
||||
ENDCASE
|
||||
l_aLIBHBGT := { "gttrm" }
|
||||
hbmk[ _HBMK_cGTDEFAULT ] := "gttrm"
|
||||
cDynLibNamePrefix := "lib"
|
||||
cBinExt := ""
|
||||
IF hbmk[ _HBMK_cPLAT ] == "vxworks"
|
||||
l_aLIBHBGT := {}
|
||||
hbmk[ _HBMK_cGTDEFAULT ] := "gtstd"
|
||||
cBinExt := ".vxe"
|
||||
ELSE
|
||||
l_aLIBHBGT := { "gttrm" }
|
||||
hbmk[ _HBMK_cGTDEFAULT ] := "gttrm"
|
||||
cBinExt := ""
|
||||
ENDIF
|
||||
cOptPrefix := "-"
|
||||
SWITCH hbmk[ _HBMK_cPLAT ]
|
||||
CASE "darwin" ; cDynLibExt := ".dylib" ; EXIT
|
||||
@@ -1399,7 +1407,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
IF Empty( hbmk[ _HBMK_cCOMP ] ) .OR. hbmk[ _HBMK_cCOMP ] == "bld"
|
||||
IF Len( aCOMPSUP ) == 1
|
||||
hbmk[ _HBMK_cCOMP ] := aCOMPSUP[ 1 ]
|
||||
ELSEIF hbmk[ _HBMK_cPLAT ] $ "bsd|hpux|sunos|beos|qnx|linux" .OR. ;
|
||||
ELSEIF hbmk[ _HBMK_cPLAT ] $ "bsd|hpux|sunos|beos|qnx|vxworks|linux" .OR. ;
|
||||
hbmk[ _HBMK_cPLAT ] == "darwin" .OR. ;
|
||||
hbmk[ _HBMK_cCOMP ] == "bld"
|
||||
hbmk[ _HBMK_cCOMP ] := hb_Version( HB_VERSION_BUILD_COMP )
|
||||
@@ -1571,7 +1579,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
/* Build with shared libs by default, if we're installed to default system locations. */
|
||||
|
||||
IF lSysLoc .AND. ( hbmk[ _HBMK_cPLAT ] $ "bsd|hpux|sunos|beos|qnx|linux" .OR. hbmk[ _HBMK_cPLAT ] == "darwin" )
|
||||
IF lSysLoc .AND. ( hbmk[ _HBMK_cPLAT ] $ "bsd|hpux|sunos|beos|qnx|vxworks|linux" .OR. hbmk[ _HBMK_cPLAT ] == "darwin" )
|
||||
hbmk[ _HBMK_lSHARED ] := .T.
|
||||
hbmk[ _HBMK_lSTATICFULL ] := .F.
|
||||
ELSE
|
||||
@@ -2567,7 +2575,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
#endif
|
||||
|
||||
DO CASE
|
||||
CASE hbmk[ _HBMK_cPLAT ] $ "bsd|linux|hpux|beos|qnx|sunos" .OR. hbmk[ _HBMK_cPLAT ] == "darwin" /* Separated to avoid match with 'win' */
|
||||
CASE hbmk[ _HBMK_cPLAT ] $ "bsd|linux|hpux|beos|qnx|vxworks|sunos" .OR. hbmk[ _HBMK_cPLAT ] == "darwin" /* Separated to avoid match with 'win' */
|
||||
IF Empty( cPrefix )
|
||||
l_aLIBSHARED := { iif( hbmk[ _HBMK_lMT ], "harbourmt" + cPostfix,;
|
||||
"harbour" + cPostfix ) }
|
||||
@@ -2646,21 +2654,26 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
DO CASE
|
||||
/* GCC family */
|
||||
CASE ( hbmk[ _HBMK_cPLAT ] == "bsd" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "darwin" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "hpux" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "sunos" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "icc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "darwin" .AND. hbmk[ _HBMK_cCOMP ] == "icc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "clang" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "darwin" .AND. hbmk[ _HBMK_cCOMP ] == "clang" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "bsd" .AND. hbmk[ _HBMK_cCOMP ] == "clang" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "beos" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "qnx" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "open64" )
|
||||
CASE ( hbmk[ _HBMK_cPLAT ] == "bsd" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "darwin" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "hpux" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "sunos" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "icc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "darwin" .AND. hbmk[ _HBMK_cCOMP ] == "icc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "clang" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "darwin" .AND. hbmk[ _HBMK_cCOMP ] == "clang" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "bsd" .AND. hbmk[ _HBMK_cCOMP ] == "clang" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "beos" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "qnx" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "vxworks" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "open64" )
|
||||
|
||||
hbmk[ _HBMK_nCmd_Esc ] := _ESC_NIX
|
||||
#if defined( __PLATFORM__UNIX )
|
||||
hbmk[ _HBMK_nCmd_Esc ] := _ESC_NIX
|
||||
#elif defined( __PLATFORM__WINDOWS )
|
||||
hbmk[ _HBMK_nCmd_Esc ] := _ESC_DBLQUOTE
|
||||
#endif
|
||||
IF hbmk[ _HBMK_lDEBUG ]
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-g" )
|
||||
ENDIF
|
||||
@@ -2694,6 +2707,9 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
CASE hbmk[ _HBMK_cCOMP ] == "open64"
|
||||
cBin_CompCPP := "openCC"
|
||||
cBin_CompC := iif( hbmk[ _HBMK_lCPP ] != NIL .AND. hbmk[ _HBMK_lCPP ], cBin_CompCPP, "opencc" )
|
||||
CASE hbmk[ _HBMK_cPLAT ] == "vxworks"
|
||||
cBin_CompCPP := hbmk[ _HBMK_cCCPREFIX ] + "g++" + hbmk[ _HBMK_cCCPOSTFIX ]
|
||||
cBin_CompC := iif( hbmk[ _HBMK_lCPP ] != NIL .AND. hbmk[ _HBMK_lCPP ], cBin_CompCPP, hbmk[ _HBMK_cCCPREFIX ] + "cc" + hbmk[ _HBMK_cCCPOSTFIX ] )
|
||||
OTHERWISE
|
||||
cBin_CompCPP := hbmk[ _HBMK_cCCPREFIX ] + "g++" + hbmk[ _HBMK_cCCPOSTFIX ]
|
||||
cBin_CompC := iif( hbmk[ _HBMK_lCPP ] != NIL .AND. hbmk[ _HBMK_lCPP ], cBin_CompCPP, hbmk[ _HBMK_cCCPREFIX ] + "gcc" + hbmk[ _HBMK_cCCPOSTFIX ] )
|
||||
@@ -2717,6 +2733,16 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
CASE _WARN_NO ; AAdd( hbmk[ _HBMK_aOPTC ], "-w" ) ; EXIT
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
IF hbmk[ _HBMK_cPLAT ] == "vxworks"
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-mrtp" )
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], "-mrtp" )
|
||||
AAdd( hbmk[ _HBMK_aOPTD ], "-mrtp" )
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-fno-strict-aliasing" )
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-D_C99" )
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-D_HAS_C9X" )
|
||||
AAdd( hbmk[ _HBMK_aINCPATH ], PathSepToSelf( GetEnv( "WIND_USR" ) ) + hb_ps() + "h" )
|
||||
AAdd( hbmk[ _HBMK_aINCPATH ], PathSepToSelf( GetEnv( "WIND_USR" ) ) + hb_ps() + "h" + hb_ps() + "wrn" + hb_ps() + "coreip" )
|
||||
ENDIF
|
||||
cOpt_CompC += " {FC}"
|
||||
IF ! Empty( hbmk[ _HBMK_cWorkDir ] )
|
||||
IF hbmk[ _HBMK_cPLAT ] $ "linux|bsd" .AND. hbmk[ _HBMK_cCOMP ] == "clang"
|
||||
@@ -2742,6 +2768,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
( hbmk[ _HBMK_cPLAT ] == "linux" .OR. ;
|
||||
hbmk[ _HBMK_cPLAT ] == "beos" .OR. ;
|
||||
hbmk[ _HBMK_cPLAT ] == "qnx" .OR. ;
|
||||
hbmk[ _HBMK_cPLAT ] == "vxworks" .OR. ;
|
||||
hbmk[ _HBMK_cPLAT ] == "bsd" )
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], "-Wl,--start-group {LL} {LB} -Wl,--end-group" )
|
||||
AAdd( hbmk[ _HBMK_aOPTD ], "-Wl,--start-group {LL} {LB} -Wl,--end-group" )
|
||||
@@ -3965,6 +3992,10 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
cBin_Link := FNameEscape( hbmk[ _HBMK_cCCPATH ] + hb_ps() + cBin_Link, hbmk[ _HBMK_nCmd_Esc ] )
|
||||
ENDIF
|
||||
|
||||
CASE hbmk[ _HBMK_cPLAT ] == "vxworks" .AND. hbmk[ _HBMK_cCOMP ] == "diab"
|
||||
|
||||
/* TODO */
|
||||
|
||||
ENDCASE
|
||||
|
||||
/* NOTE: We only use different shared object flags when compiling for
|
||||
@@ -8724,6 +8755,9 @@ STATIC PROCEDURE PlatformPRGFlags( hbmk, aOPTPRG )
|
||||
CASE hbmk[ _HBMK_cPLAT ] == "qnx"
|
||||
AAdd( aDf, "__PLATFORM__QNX" )
|
||||
AAdd( aDf, "__PLATFORM__UNIX" )
|
||||
CASE hbmk[ _HBMK_cPLAT ] == "vxworks"
|
||||
AAdd( aDf, "__PLATFORM__VXWORKS" )
|
||||
AAdd( aDf, "__PLATFORM__UNIX" )
|
||||
ENDCASE
|
||||
|
||||
/* Setup those CPU flags which we can be sure about.
|
||||
@@ -9727,7 +9761,7 @@ FUNCTION hbmk_KEYW( hbmk, cKeyword, cValue )
|
||||
CASE "static" ; RETURN ! hbmk[ _HBMK_lSHARED ]
|
||||
CASE "unicode" ; RETURN hbmk[ _HBMK_lUNICODE ]
|
||||
CASE "ascii" ; RETURN ! hbmk[ _HBMK_lUNICODE ]
|
||||
CASE "unix" ; RETURN "|" + hbmk[ _HBMK_cPLAT ] + "|" $ "|bsd|hpux|sunos|beos|qnx|linux|darwin|"
|
||||
CASE "unix" ; RETURN "|" + hbmk[ _HBMK_cPLAT ] + "|" $ "|bsd|hpux|sunos|beos|qnx|vxworks|linux|darwin|"
|
||||
CASE "allwin" ; RETURN "|" + hbmk[ _HBMK_cPLAT ] + "|" $ "|win|wce|"
|
||||
CASE "allgcc" ; RETURN "|" + hbmk[ _HBMK_cCOMP ] + "|" $ "|gcc|mingw|mingw64|mingwarm|cygwin|djgpp|gccomf|clang|open64|"
|
||||
CASE "allmingw" ; RETURN "|" + hbmk[ _HBMK_cCOMP ] + "|" $ "|mingw|mingw64|mingwarm|"
|
||||
@@ -9747,7 +9781,7 @@ FUNCTION hbmk_KEYW( hbmk, cKeyword, cValue )
|
||||
ENDIF
|
||||
|
||||
IF ! ( "|" + cKeyword + "|" $ "|win|wce|dos|os2" + ;
|
||||
"|bsd|hpux|sunos|beos|qnx|linux|darwin" + ;
|
||||
"|bsd|hpux|sunos|beos|qnx|vxworks|linux|darwin" + ;
|
||||
"|msvc|msvc64|msvcia64|msvcarm" + ;
|
||||
"|pocc|pocc64|poccarm|xcc" + ;
|
||||
"|mingw|mingw64|mingwarm|cygwin|bcc|watcom" + ;
|
||||
@@ -10302,18 +10336,19 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong )
|
||||
LOCAL aText_Supp := {;
|
||||
"",;
|
||||
I_( "Supported <comp> values for each supported <plat> value:" ),;
|
||||
" - linux : gcc, clang, icc, watcom, sunpro, open64",;
|
||||
" - darwin : gcc, clang, icc",;
|
||||
" - win : mingw, msvc, bcc, watcom, icc, pocc, cygwin, xcc,",;
|
||||
" - mingw64, msvc64, msvcia64, iccia64, pocc64",;
|
||||
" - wce : mingwarm, mingw, msvcarm, poccarm",;
|
||||
" - os2 : gcc, gccomf, watcom",;
|
||||
" - dos : djgpp, watcom",;
|
||||
" - bsd : gcc, clang",;
|
||||
" - hpux : gcc",;
|
||||
" - beos : gcc",;
|
||||
" - qnx : gcc",;
|
||||
" - sunos : gcc, sunpro" }
|
||||
" - linux : gcc, clang, icc, watcom, sunpro, open64",;
|
||||
" - darwin : gcc, clang, icc",;
|
||||
" - win : mingw, msvc, bcc, watcom, icc, pocc, cygwin, xcc,",;
|
||||
" - mingw64, msvc64, msvcia64, iccia64, pocc64",;
|
||||
" - wce : mingwarm, mingw, msvcarm, poccarm",;
|
||||
" - os2 : gcc, gccomf, watcom",;
|
||||
" - dos : djgpp, watcom",;
|
||||
" - bsd : gcc, clang",;
|
||||
" - hpux : gcc",;
|
||||
" - beos : gcc",;
|
||||
" - qnx : gcc",;
|
||||
" - vxworks : gcc, diab",;
|
||||
" - sunos : gcc, sunpro" }
|
||||
|
||||
LOCAL aOpt_Basic := {;
|
||||
{ "-o<outname>" , I_( "output file name" ) },;
|
||||
|
||||
Reference in New Issue
Block a user