2009-04-20 14:32 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/include/hbcomp.h
  * harbour/source/common/hbdate.c
  * harbour/source/rtl/strmatch.c
  * harbour/source/rtl/fssize.c
  * harbour/source/rtl/hbffind.c
  * harbour/source/rtl/filesys.c
    * enabled some POSIX function added to 1.8 Linux OpenWatcom builds
      and cleaned some workarounds not longer necessary

  * harbour/source/rtl/hbproces.c
    + added hack with small sysconf() implementation which is still missing
      in OpenWatcom 1.8. Now it's possible to build Harbour in Linux using
      officially distributed OpenWatcom 1.8

  * harbour/source/rtl/disksphb.c
    * added TODO warning message

  * harbour/source/compiler/cmdcheck.c
    ! fixed typo in memory freeing in repeated -p<path> options
This commit is contained in:
Przemyslaw Czerpak
2009-04-20 12:24:42 +00:00
parent 60beb19545
commit 9ad880c611
10 changed files with 58 additions and 23 deletions

View File

@@ -8,6 +8,27 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-04-20 14:32 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
* harbour/source/common/hbdate.c
* harbour/source/rtl/strmatch.c
* harbour/source/rtl/fssize.c
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/filesys.c
* enabled some POSIX function added to 1.8 Linux OpenWatcom builds
and cleaned some workarounds not longer necessary
* harbour/source/rtl/hbproces.c
+ added hack with small sysconf() implementation which is still missing
in OpenWatcom 1.8. Now it's possible to build Harbour in Linux using
officially distributed OpenWatcom 1.8
* harbour/source/rtl/disksphb.c
* added TODO warning message
* harbour/source/compiler/cmdcheck.c
! fixed typo in memory freeing in repeated -p<path> options
2009-04-20 14:00 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* utils/hbmk2/hbmk2.prg
! Fixed to inherit .hbm dir before doing wildcard expansion.

View File

@@ -57,9 +57,6 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#if defined(__WATCOMC__)
#include <malloc.h> /* alloca prototype */
#endif
#include "hbmacro.ch"
#include "hbapi.h"

View File

@@ -79,7 +79,7 @@
#endif
#include <time.h>
#if ( defined( HB_OS_BSD ) || defined( HB_OS_LINUX ) ) && !defined( __WATCOMC__ )
#if defined( HB_OS_UNIX )
# include <sys/time.h>
#elif !defined( HB_OS_WIN )
# include <sys/timeb.h>
@@ -125,7 +125,7 @@ void hb_timeStampGetLocal( int * piYear, int * piMonth, int * piDay,
struct tm st;
time_t seconds, millisecs;
# if defined( HB_OS_UNIX ) && !defined( __WATCOMC__ )
# if defined( HB_OS_UNIX )
struct timeval tv;
gettimeofday( &tv, NULL );
seconds = tv.tv_sec;
@@ -167,7 +167,7 @@ HB_ULONG hb_dateMilliSeconds( void )
HB_MILLISECS_PER_DAY +
hb_timeEncode( st.wHour, st.wMinute, st.wSecond, st.wMilliseconds );
}
#elif defined( HB_OS_UNIX ) && !defined( __WATCOMC__ )
#elif defined( HB_OS_UNIX )
{
struct timeval tv;
gettimeofday( &tv, NULL );

View File

@@ -478,31 +478,29 @@ static void hb_compChkEnvironVar( HB_COMP_DECL, const char *szSwitch )
case 'o':
case 'O':
{
char *szPath = hb_strdup( s + 1 );
HB_COMP_PARAM->pOutPath = hb_fsFNameSplit( szPath );
hb_xfree( szPath );
HB_COMP_PARAM->pOutPath = hb_fsFNameSplit( s + 1 );
break;
}
/* Added for preprocessor needs */
case 'p':
case 'P':
if( s[ 1 ] == '+' && s[ 2 ] == '\0' )
HB_COMP_PARAM->fPPT = TRUE;
else if( s[ 1 ] == '-' && s[ 2 ] == '\0' )
HB_COMP_PARAM->fPPO = FALSE;
else
{
if( HB_COMP_PARAM->pPpoPath )
{
HB_COMP_PARAM->pPpoPath = NULL;
hb_xfree( HB_COMP_PARAM->pPpoPath );
HB_COMP_PARAM->pPpoPath = NULL;
}
if( s[ 1 ] == '-' && s[ 2 ] == '\0' )
HB_COMP_PARAM->fPPO = FALSE;
else
{
if( s[ 1 ] )
HB_COMP_PARAM->pPpoPath = hb_fsFNameSplit( s + 1 );
HB_COMP_PARAM->fPPO = TRUE;
}
if( s[ 1 ] )
HB_COMP_PARAM->pPpoPath = hb_fsFNameSplit( s + 1 );
HB_COMP_PARAM->fPPO = TRUE;
}
break;

View File

@@ -374,6 +374,8 @@ HB_FUNC( HB_DISKSPACE )
}
#else
{
int iTODO;
HB_SYMBOL_UNUSED( szPath );
HB_SYMBOL_UNUSED( uiType );
}

View File

@@ -1831,7 +1831,7 @@ void hb_fsCommit( HB_FHANDLE hFileHandle )
* original or duplicated file handle
*/
hb_vmUnlock();
#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO + 0 > 0
#if defined( _POSIX_SYNCHRONIZED_IO )
/* faster - flushes data buffers only, without updating directory info
*/
hb_fsSetIOError( fdatasync( hFileHandle ) == 0, 0 );

View File

@@ -72,7 +72,7 @@
* on 32bit machines.
*/
#define HB_USE_LARGEFILE64
#elif defined( HB_OS_UNIX ) && defined( O_LARGEFILE ) && ! defined( __WATCOMC__ )
#elif defined( HB_OS_UNIX ) && defined( O_LARGEFILE )
#define HB_USE_LARGEFILE64
#endif
#endif

View File

@@ -165,7 +165,7 @@
* on 32bit machines.
*/
#define HB_USE_LARGEFILE64
#elif defined( HB_OS_UNIX ) && defined( O_LARGEFILE ) && ! defined( __WATCOMC__ )
#elif defined( HB_OS_UNIX ) && defined( O_LARGEFILE )
#define HB_USE_LARGEFILE64
#endif
#endif

View File

@@ -735,3 +735,20 @@ BOOL hb_fsProcessClose( HB_FHANDLE hProcess, BOOL fGentle )
#endif
return fResult;
}
/* small hack for still missing sysconf() in Watcom 1.8 */
#if defined( HB_OS_LINUX ) && defined( __WATCOMC__ )
_WCRTLINK long sysconf( int __name )
{
switch( __name )
{
case _SC_OPEN_MAX:
return 1024;
case _SC_CLK_TCK:
return 100;
case /* _SC_PAGE_SIZE */ 30:
return 4096;
}
return -1;
}
#endif

View File

@@ -53,7 +53,7 @@
#include "hbapi.h"
#include "hbregex.h"
#if defined( HB_OS_UNIX ) && !defined( __WATCOMC__ )
#if defined( HB_OS_UNIX ) && !defined( HB_NO_FNMATCH )
# include <fnmatch.h>
#endif
@@ -293,7 +293,7 @@ BOOL hb_strMatchRegExp( const char * szString, const char * szPattern )
BOOL hb_strMatchFile( const char * szString, const char * szPattern )
{
#if defined( HB_OS_UNIX )
# if defined( __WATCOMC__ )
# if defined( HB_NO_FNMATCH )
return hb_strMatchWildExact( szString, szPattern );
# else
return fnmatch( szPattern, szString, FNM_PERIOD | FNM_PATHNAME ) == 0;