2010-06-14 15:29 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* src/vm/dynlibhb.c
  * include/hbthread.h
    + Added QNX support.

  * src/rtl/hbzlib.c
    ! Added hack to fix missing zlibVersion() and zError()
      functions from the zlib lib shipped with QNX 6.2.1.

  + config/qnx/libs.mk
    + Added QNX specific lib configuration.

  * utils/hbmk2/hbmk2.prg
    + Added (untested) list of system libs for qnx/gcc.

  * INSTALL
    + Added QNX reference to one more place.

  ; NOTE on QNX:
      All binaries build cleanly, hbtest works.
  ; TOFIX/TODO:
      - hbrun seems to misdetect the width of the terminal
      - Clean some hack in QNX port
      - platform autodetection
      - retest whole port from vanilla SVN source, test MT
        linkage.

  ; So now Harbour can run in cars, planes and spaceships.
This commit is contained in:
Viktor Szakats
2010-06-14 13:35:19 +00:00
parent b982aa726f
commit 83bab940b8
7 changed files with 77 additions and 4 deletions

View File

@@ -16,6 +16,35 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-06-14 15:29 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/dynlibhb.c
* include/hbthread.h
+ Added QNX support.
* src/rtl/hbzlib.c
! Added hack to fix missing zlibVersion() and zError()
functions from the zlib lib shipped with QNX 6.2.1.
+ config/qnx/libs.mk
+ Added QNX specific lib configuration.
* utils/hbmk2/hbmk2.prg
+ Added (untested) list of system libs for qnx/gcc.
* INSTALL
+ Added QNX reference to one more place.
; NOTE on QNX:
All binaries build cleanly, hbtest works.
; TOFIX/TODO:
- hbrun seems to misdetect the width of the terminal
- Clean some hack in QNX port
- platform autodetection
- retest whole port from vanilla SVN source, test MT
linkage.
; So now Harbour can run in cars, planes and spaceships.
2010-06-14 14:26 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* external/zlib/Makefile
* config/dos/djgpp.mk

View File

@@ -133,8 +133,8 @@ HARBOUR
$ ./hello
You should see 'Hello world!' on screen.
on BSD/HP-UX/Solaris/BeOS/Haiku/*nix hosts
------------------------------------------
on BSD/HP-UX/Solaris/BeOS/Haiku/QNX/*nix hosts
----------------------------------------------
(possible cross-build targets: Windows, Windows CE, MS-DOS)
$ gmake install [HB_PLATFORM=<...>]

View File

@@ -0,0 +1,28 @@
#
# $Id$
#
SYSLIBPATHS :=
ifneq ($(HB_LINKING_RTL),)
ifeq ($(HB_LIBNAME_CURSES),)
HB_LIBNAME_CURSES := ncurses
endif
ifneq ($(HB_HAS_CURSES),)
SYSLIBS += $(HB_LIBNAME_CURSES)
endif
ifneq ($(HB_HAS_SLANG),)
SYSLIBS += slang
endif
ifneq ($(HB_HAS_PCRE),)
ifeq ($(HB_HAS_PCRE_LOCAL),)
SYSLIBS += pcre
endif
endif
ifeq ($(HB_HAS_ZLIB_LOCAL),)
SYSLIBS += z
endif
SYSLIBS += socket
endif
SYSLIBS += m

View File

@@ -63,7 +63,8 @@
# define HB_TASK_THREAD
#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_BSD ) || defined( HB_OS_BEOS ) || \
defined( HB_OS_QNX )
# include <pthread.h>
# define HB_PTHREAD_API
#elif defined( HB_OS_WIN )

View File

@@ -110,7 +110,12 @@ HB_FUNC( HB_ZLIBVERSION )
if( hb_parni( 1 ) == 1 )
hb_retc_const( ZLIB_VERSION );
else
#if defined( HB_OS_QNX )
/* NOTE: Hack to avoid "undefined reference to 'zlibVersion' when linking hbrun. */
hb_retc_null();
#else
hb_retc( zlibVersion() );
#endif
}
/*
@@ -294,5 +299,10 @@ HB_FUNC( HB_ZUNCOMPRESS )
*/
HB_FUNC( HB_ZERROR )
{
#if defined( HB_OS_QNX )
/* NOTE: Hack to avoid "undefined reference to 'zlibVersion' when linking hbrun. */
hb_retc_null();
#else
hb_retc( zError( hb_parni( 1 ) ) );
#endif
}

View File

@@ -80,6 +80,7 @@
( ( defined( HB_OS_LINUX ) && !defined( __WATCOMC__ ) ) || \
defined( HB_OS_SUNOS ) || defined( HB_OS_DARWIN ) || \
defined( HB_OS_BSD ) || defined( HB_OS_BEOS ) || \
defined( HB_OS_QNX ) || \
( defined( __DJGPP__ ) && \
( __DJGPP__ > 2 || ( __DJGPP__ == 2 && __DJGPP_MINOR__ >= 4 ) ) ) )
# define HB_HAS_DLFCN

View File

@@ -2751,7 +2751,9 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
IF !( hbmk[ _HBMK_cPLAT ] == "beos" )
AAdd( l_aLIBSYS, "m" )
IF hbmk[ _HBMK_lMT ]
AAdd( l_aLIBSYS, "pthread" )
IF !( hbmk[ _HBMK_cPLAT ] == "qnx" )
AAdd( l_aLIBSYS, "pthread" )
ENDIF
ENDIF
ENDIF
DO CASE
@@ -2769,6 +2771,8 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
AAdd( hbmk[ _HBMK_aLIBPATH ], "/system/lib" )
AAdd( l_aLIBSYS, "root" )
AAdd( l_aLIBSYS, "network" )
CASE hbmk[ _HBMK_cPLAT ] == "qnx"
AAdd( l_aLIBSYS, "socket" )
ENDCASE
IF ! Empty( cLIB_BASE_PCRE ) .AND. ! hb_FileExists( _HBLIB_FULLPATH( cLIB_BASE_PCRE ) )