diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 18e40a9ad6..a8abcf81cd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,26 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-25 01:50 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * config/wce/global.mk + * config/win/global.mk + * config/win/msvc.mk + * config/rules.mk + * INSTALL + * UNICODE mode turned on for all Windows compilers. + To override it, use: 'HB_BUILD_UNICODE=no' + % Cleaned the way UNICODE is enabled. + + * src/common/hbfsapi.c + * src/rtl/gtstd/gtstd.c + * src/rtl/gtpca/gtpca.c + ! HB_IO_WIN -> HB_OS_WIN. + (missed from previous commit) + + * utils/hbmk2/hbmk2.prg + * ENDTEXT -> #pragma __endtext + (Thanks for the hint, Xavi) + 2010-02-24 20:04 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/pp/ppcore.c * src/compiler/cmdcheck.c diff --git a/harbour/INSTALL b/harbour/INSTALL index ca6c7e72e6..4bfc870348 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -614,7 +614,7 @@ HARBOUR Default: no - HB_BUILD_OPTIM=no Enable C compiler optimizations. Default: yes - HB_BUILD_UNICODE=yes Create Unicode build (on Windows/Windows CE). - Default: no + Default: yes - HB_BUILD_MODE=[cpp|c] Change default build mode to C++ or C. Default: c, except for msvc* compilers, where it's cpp. - HB_BUILD_PARTS= diff --git a/harbour/config/rules.mk b/harbour/config/rules.mk index 414270c846..1330678619 100644 --- a/harbour/config/rules.mk +++ b/harbour/config/rules.mk @@ -12,10 +12,6 @@ else HB_PRGFLAGS := -l $(HB_PRGFLAGS) endif -ifeq ($(HB_BUILD_UNICODE),yes) - HB_CFLAGS := -DUNICODE $(HB_CFLAGS) -endif - HB_CFLAGS := -DHB_LEGACY_TYPES_OFF $(HB_CFLAGS) ifeq ($(HB_DYN_COPT),) diff --git a/harbour/config/wce/global.mk b/harbour/config/wce/global.mk index 396a225834..059ae15843 100644 --- a/harbour/config/wce/global.mk +++ b/harbour/config/wce/global.mk @@ -9,7 +9,7 @@ DYN_EXT := .dll HB_GT_LIBS += gtwvt gtgui +HB_CFLAGS += -DUNICODE HB_CFLAGS += -DUNDER_CE -HB_BUILD_UNICODE := yes SYSLIBS += coredll ws2 diff --git a/harbour/config/win/global.mk b/harbour/config/win/global.mk index 07c5a5cda0..8f2a77ce23 100644 --- a/harbour/config/win/global.mk +++ b/harbour/config/win/global.mk @@ -9,9 +9,8 @@ DYN_EXT := .dll HB_GT_LIBS += gtwvt gtgui gtwin -# enable UNICODE by default when building for any non-x86 targets (x86_64 or ia64) -ifneq ($(HB_CPU),x86) - HB_BUILD_UNICODE := yes +ifneq ($(HB_BUILD_UNICODE),no) + HB_CFLAGS += -DUNICODE endif # kernel32: needed by some compilers (pocc/watcom) diff --git a/harbour/config/win/msvc.mk b/harbour/config/win/msvc.mk index 3e9fcb75ee..6fc8f49510 100644 --- a/harbour/config/win/msvc.mk +++ b/harbour/config/win/msvc.mk @@ -6,16 +6,6 @@ OBJ_EXT := .obj LIB_PREF := LIB_EXT := .lib -ifeq ($(HB_BUILD_UNICODE),) - ifeq ($(HB_CPU),x86) - # Always compile in UNICODE mode for MSVC 9.0 and upper - # These versions don't support Win9x anymore, so it's safe. [vszakats] - ifeq ($(filter $(HB_COMPILER_VER),600 700 710 800),) - HB_BUILD_UNICODE := yes - endif - endif -endif - HB_DYN_COPT := -DHB_DYNLIB CC := cl.exe diff --git a/harbour/src/common/hbfsapi.c b/harbour/src/common/hbfsapi.c index 9ac653694c..1fd3fb5ec3 100644 --- a/harbour/src/common/hbfsapi.c +++ b/harbour/src/common/hbfsapi.c @@ -72,7 +72,7 @@ #include #include #endif -#if !defined( HB_IO_WIN ) +#if !defined( HB_OS_WIN ) #include #endif @@ -467,7 +467,7 @@ HB_BOOL hb_fsMaxFilesError( void ) { HB_TRACE(HB_TR_DEBUG, ("hb_fsMaxFilesError()")); -#if defined( HB_IO_WIN ) +#if defined( HB_OS_WIN ) return GetLastError() == ERROR_TOO_MANY_OPEN_FILES; #else return errno == EMFILE; diff --git a/harbour/src/rtl/gtpca/gtpca.c b/harbour/src/rtl/gtpca/gtpca.c index 571fb4a762..3e23881acc 100644 --- a/harbour/src/rtl/gtpca/gtpca.c +++ b/harbour/src/rtl/gtpca/gtpca.c @@ -80,7 +80,7 @@ #include #include #else -# if defined( HB_IO_WIN ) +# if defined( HB_OS_WIN ) # include # endif # if ( defined( _MSC_VER ) || defined( __WATCOMC__ ) ) && !defined( HB_OS_WIN_CE ) @@ -651,7 +651,7 @@ static int hb_gt_pca_ReadKey( PHB_GT pGT, int iEventMask ) if( _read( ( int ) s_hFilenoStdin, &bChar, 1 ) == 1 ) ch = s_keyTransTbl[ bChar ]; } -#elif defined( HB_IO_WIN ) +#elif defined( HB_OS_WIN ) if( !s_bStdinConsole || WaitForSingleObject( ( HANDLE ) hb_fsGetOsHandle( s_hFilenoStdin ), 0 ) == 0x0000 ) { diff --git a/harbour/src/rtl/gtstd/gtstd.c b/harbour/src/rtl/gtstd/gtstd.c index 93cd6dcdd1..b7763fc08d 100644 --- a/harbour/src/rtl/gtstd/gtstd.c +++ b/harbour/src/rtl/gtstd/gtstd.c @@ -72,7 +72,7 @@ #include #include #else -# if defined( HB_IO_WIN ) +# if defined( HB_OS_WIN ) # include # endif # if ( defined( _MSC_VER ) || defined( __WATCOMC__ ) ) && !defined( HB_OS_WIN_CE ) @@ -275,7 +275,7 @@ static void hb_gt_std_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil } } #endif -#elif defined( HB_IO_WIN ) && ! defined( HB_OS_WIN_CE ) +#elif defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) if( pGTSTD->fStdinConsole ) { SetConsoleMode( ( HANDLE ) hb_fsGetOsHandle( pGTSTD->hStdin ), 0x0000 ); @@ -374,7 +374,7 @@ static int hb_gt_std_ReadKey( PHB_GT pGT, int iEventMask ) if( _read( ( int ) pGTSTD->hStdin, &bChar, 1 ) == 1 ) ch = pGTSTD->keyTransTbl[ bChar ]; } -#elif defined( HB_IO_WIN ) +#elif defined( HB_OS_WIN ) if( !pGTSTD->fStdinConsole || WaitForSingleObject( ( HANDLE ) hb_fsGetOsHandle( pGTSTD->hStdin ), 0 ) == 0x0000 ) { diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index d1d513bbeb..d66555373e 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -7857,7 +7857,7 @@ STATIC FUNCTION MacOSXFiles( hbmk, nType, cPROGNAME ) %TAB% - ENDTEXT + #pragma __endtext EXIT CASE 2 cString := "%__APPTYPE__%%__APPSIGN__%"