diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 33767081fe..0a41b75591 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,20 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-06-04 15:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/make_gnu.sh + * harbour/make_tgz.sh + * harbour/bin/hb-func.sh + * harbour/bin/postinst.sh + * HPUX build cleanup + + * harbour/source/debug/dbgentry.c + * cast isalpha() and isdigit() parameters to unsigned char + + * harbour/source/rtl/hbinet.c + * harbour/source/rtl/gtstd/gtstd.c + * HPUX build cleanup + 2007-06-04 08:04 UTC-0300 Antonio Carlos Pantaglione + harbour/contrib/tip/make_b32.bat + harbour/contrib/tip/makefile.bc diff --git a/harbour/bin/hb-func.sh b/harbour/bin/hb-func.sh index 78c901a45b..f75dbe49eb 100644 --- a/harbour/bin/hb-func.sh +++ b/harbour/bin/hb-func.sh @@ -129,6 +129,9 @@ mk_hbtools() elif [ "${HB_COMPILER}" = "djgpp" ]; then HB_SYS_LIBS="${HB_SYS_LIBS}" else + if [ "${HB_ARCHITECTURE}" = "linux" ]; then + HB_SYS_LIBS="${HB_SYS_LIBS} -ldl" + fi if [ "${HB_ARCHITECTURE}" = "sunos" ]; then HB_SYS_LIBS="${HB_SYS_LIBS} -lrt" HB_CRS_LIB="curses" @@ -326,7 +329,6 @@ fi [ -n "\${HB_GPM_LIB}" ] && SYSTEM_LIBS="\${SYSTEM_LIBS} -l\${HB_GPM_LIB}" if [ "\${HB_STATIC}" = "full" ]; then - SYSTEM_LIBS="\${SYSTEM_LIBS} -ldl" if [ "\${HB_ARCHITECTURE}" = "linux" ]; then SYSTEM_LIBS="\${SYSTEM_LIBS} -lpthread" fi @@ -391,7 +393,9 @@ fi if [ "\${HB_HWGUI}" = "yes" ]; then HARBOUR_LIBS="\${HARBOUR_LIBS} -lhwgui -lprocmisc -lhbxml" fi -if [ "\${HB_ARCHITECTURE}" = "darwin" ] || [ "\${HB_ARCHITECTURE}" = "sunos" ]; then +if [ "\${HB_ARCHITECTURE}" = "darwin" ] || \\ + [ "\${HB_ARCHITECTURE}" = "sunos" ] || \\ + [ "\${HB_ARCHITECTURE}" = "hpux" ]; then HARBOUR_LIBS="\${HARBOUR_LIBS} \${HARBOUR_LIBS}" else HARBOUR_LIBS="-Wl,--start-group \${HARBOUR_LIBS} -Wl,--end-group" diff --git a/harbour/bin/postinst.sh b/harbour/bin/postinst.sh index 9cdfdab75e..fa6dcabafe 100644 --- a/harbour/bin/postinst.sh +++ b/harbour/bin/postinst.sh @@ -41,7 +41,9 @@ then RANLIB="" MAKE=make AR="${CCPREFIX}ar -cr" - if [ "${HB_ARCHITECTURE}" = "bsd" ] || [ `uname` = "FreeBSD" ]; then + if [ "${HB_ARCHITECTURE}" = "bsd" ] || \ + [ "${HB_ARCHITECTURE}" = "hpux" ] || \ + [ `uname` = "FreeBSD" ]; then MAKE=gmake elif [ "${HB_ARCHITECTURE}" = "darwin" ]; then # We must build an archive index on Darwin diff --git a/harbour/make_gnu.sh b/harbour/make_gnu.sh index f5b0a475d9..97c75ee302 100644 --- a/harbour/make_gnu.sh +++ b/harbour/make_gnu.sh @@ -185,7 +185,9 @@ else # --------------------------------------------------------------- # Start the GNU make system - if [ "$HB_ARCHITECTURE" = "bsd" ] || uname|grep "BSD$" &> /dev/null; then + if [ "$HB_ARCHITECTURE" = "bsd" ] || [ "$HB_ARCHITECTURE" = "hpux" ] || \ + uname|grep "BSD$" &> /dev/null + then gmake $* else make $* diff --git a/harbour/make_tgz.sh b/harbour/make_tgz.sh index b4106940ab..36269967d2 100644 --- a/harbour/make_tgz.sh +++ b/harbour/make_tgz.sh @@ -129,7 +129,7 @@ case "$HB_ARCHITECTURE" in gtar --version >/dev/null 2>&1 && TAR=gtar INSTALL="install -c" ;; - bsd) + bsd|hpux) MAKE=gmake ;; esac @@ -213,8 +213,10 @@ done # Keep the size of the binaries to a minimim. strip $HB_BIN_INSTALL/harbour${hb_exesuf} -# Keep the size of the libraries to a minimim, but don't try to strip symlinks. -strip -S `find $HB_LIB_INSTALL -type f` +if [ "$HB_ARCHITECTURE" != "hpux" ]; then + # Keep the size of the libraries to a minimim, but don't try to strip symlinks. + strip -S `find $HB_LIB_INSTALL -type f` +fi if [ "${hb_sysdir}" = "yes" ]; then @@ -264,6 +266,7 @@ ln -s pp${hb_exesuf} $HB_BIN_INSTALL/pprun${hb_exesuf} $INSTALL -m644 rp_dot.ch $HB_INC_INSTALL/ rm -f pp${hb_exesuf}) +chmod 644 $HB_INC_INSTALL/* CURDIR=$(pwd) (cd "${HB_INST_PREF}"; $TAR -czvf "${CURDIR}/${hb_archfile}" --owner=${HB_INSTALL_OWNER} --group=${HB_INSTALL_GROUP} .) diff --git a/harbour/source/debug/dbgentry.c b/harbour/source/debug/dbgentry.c index 4cf0f03fb0..b837249ae8 100644 --- a/harbour/source/debug/dbgentry.c +++ b/harbour/source/debug/dbgentry.c @@ -1031,8 +1031,8 @@ hb_dbgEvalMacro( char *szExpr, PHB_ITEM pItem ) } -#define IS_IDENT_START( c ) ( isalpha( (c) ) || (c) == '_' ) -#define IS_IDENT_CHAR( c ) ( IS_IDENT_START( (c) ) || isdigit( (c) ) ) +#define IS_IDENT_START( c ) ( isalpha( (UCHAR) (c) ) || (c) == '_' ) +#define IS_IDENT_CHAR( c ) ( IS_IDENT_START( (c) ) || isdigit( (UCHAR) (c) ) ) static PHB_ITEM hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch ) diff --git a/harbour/source/rtl/gtstd/gtstd.c b/harbour/source/rtl/gtstd/gtstd.c index eb11ebea69..233099a516 100644 --- a/harbour/source/rtl/gtstd/gtstd.c +++ b/harbour/source/rtl/gtstd/gtstd.c @@ -201,7 +201,13 @@ static void hb_gt_std_Init( FHANDLE hFilenoStdin, FHANDLE hFilenoStdout, FHANDLE memcpy( &act, &old, sizeof( struct sigaction ) ); act.sa_handler = sig_handler; /* do not use SA_RESTART - new Linux kernels will repeat the operation */ +#if defined( SA_ONESHOT ) act.sa_flags = SA_ONESHOT; +#elif defined( SA_RESETHAND ) + act.sa_flags = SA_RESETHAND; +#else + act.sa_flags = 0; +#endif sigaction( SIGTTOU, &act, 0 ); tcgetattr( hFilenoStdin, &s_saved_TIO ); diff --git a/harbour/source/rtl/hbinet.c b/harbour/source/rtl/hbinet.c index 4c2737f011..6cefd6b7d2 100644 --- a/harbour/source/rtl/hbinet.c +++ b/harbour/source/rtl/hbinet.c @@ -200,13 +200,6 @@ #define socklen_t int #endif -#if defined( HB_OS_HPUX ) -char * hstrerror( int ierr ) -{ - return( sprintf( "error %i", ierr ) ); -} -#endif - #ifdef HB_OS_LINUX #include #define HB_INET_LINUX_INTERRUPT SIGUSR1+90 @@ -340,7 +333,7 @@ static struct hostent * hb_getHosts( char * name, HB_SOCKET_STRUCT *Socket ) #if defined(HB_OS_WIN_32) HB_SOCKET_SET_ERROR2( Socket, WSAGetLastError() , "Generic error in GetHostByName()" ); WSASetLastError( 0 ); -#elif defined(HB_OS_OS2) +#elif defined(HB_OS_OS2) || defined(HB_OS_HPUX) HB_SOCKET_SET_ERROR2( Socket, h_errno, "Generic error in GetHostByName()" ); #else HB_SOCKET_SET_ERROR2( Socket, h_errno, (char *) hstrerror( h_errno ) ); @@ -1523,12 +1516,13 @@ HB_FUNC( HB_INETACCEPT ) HB_SOCKET_T incoming = 0; int iError = EAGAIN; struct sockaddr_in si_remote; - - #if defined(HB_OS_WIN_32) - int Len; - #else - UINT Len; - #endif +#if defined(_XOPEN_SOURCE_EXTENDED) + socklen_t Len; +#elif defined(HB_OS_WIN_32) + int Len; +#else + unsigned int Len; +#endif if( Socket == NULL ) {