diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1c4b1cecf8..cc0587a9ab 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,18 @@ The license applies to all entries newer than 2009-04-28. */ +2010-09-08 08:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/config/c.mk + * harbour/config/rules.mk + * use .sx file extension instead of .S to avoid problems with + non case sensitive filesystems + + * harbour/src/rtl/fstemp.c + ! fixed DOS version of hb_fsTempDir() - tmpnam() may return pure + file name without path i.e. in OpenWartcom builds + * accept optionally TEMP, TMP and TMPDIR environment variables in + DOS and OS2 build looking for directory with temporary files + 2010-09-07 21:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + contrib/hbqt/qtgui/qth/QPrinterInfo.qth + Added: new class. diff --git a/harbour/config/c.mk b/harbour/config/c.mk index 81ba3513cb..4900c7aa5b 100644 --- a/harbour/config/c.mk +++ b/harbour/config/c.mk @@ -3,7 +3,7 @@ # C_OBJS := $(C_SOURCES:.c=$(OBJ_EXT)) $(CPP_SOURCES:.cpp=$(OBJ_EXT)) -S_OBJS := $(S_SOURCES:.s=$(OBJ_EXT)) $(SS_SOURCES:.S=$(OBJ_EXT)) +S_OBJS := $(S_SOURCES:.s=$(OBJ_EXT)) $(SX_SOURCES:.sx=$(OBJ_EXT)) C_MAIN_OBJ := $(C_MAIN:.c=$(OBJ_EXT)) diff --git a/harbour/config/rules.mk b/harbour/config/rules.mk index e557e169a4..8d9eff80eb 100644 --- a/harbour/config/rules.mk +++ b/harbour/config/rules.mk @@ -57,12 +57,10 @@ ifeq ($(CC_RULE),) endif ifeq ($(S_RULE),) - # the hack with .s => .S translation is workaround for - # some filesystems which can change filename to lowercase - S_RULE = $(CC) $(subst $(CC_DIRSEPFROM),$(CC_DIRSEPTO),$(CC_FLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(szPath, HB_PATH_MAX - 1 ); hb_xfree( pTempName ); + + if( hb_fsDirExists( pszTempDir ) ) + nResult = 0; + } + } + if( nResult != 0 ) + { + static const char * env_tmp[] = { "TEMP", "TMP", "TMPDIR", NULL }; + + const char ** tmp = env_tmp; + + while( *tmp && nResult != 0 ) + { + char * pszTempDirEnv = hb_getenv( *tmp++ ); + + if( pszTempDirEnv ) + { + if( fsGetTempDirByCase( pszTempDir, pszTempDirEnv ) ) + nResult = 0; + hb_xfree( pszTempDirEnv ); + } + } + if( pszTempDir[ 0 ] != '\0' ) + { + int len = ( int ) strlen( pszTempDir ); + if( pszTempDir[ len - 1 ] != HB_OS_PATH_DELIM_CHR ) + { + pszTempDir[ len ] = HB_OS_PATH_DELIM_CHR; + pszTempDir[ len + 1 ] = '\0'; + } + } + else + { + pszTempDir[ 0 ] = '.'; + pszTempDir[ 1 ] = HB_OS_PATH_DELIM_CHR; + pszTempDir[ 2 ] = '\0'; } } }