From 32909568c0704369aec0ddd8d4432ef4a79ccc9d Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 26 Oct 2008 23:04:57 +0000 Subject: [PATCH] 2008-10-27 00:01 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * source/common/hbver.c * Changed to include bitness even for DJGPP. * Changed "(* bit)" to "(*-bit)" ; NOTE: We have __ARCH*BIT__ but this macro is misleading and cannot be used properly on platforms where the compiler is able to generate multiple targets in one build pass. Such system is Darwin/OSX. I'd suggest to consider removing this macro, and rather adding a function to return bitness. Any opininons? --- harbour/ChangeLog | 12 ++++++++++++ harbour/source/common/hbver.c | 12 ++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index eca1a76cf7..a98f8ede26 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,18 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-27 00:01 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * source/common/hbver.c + * Changed to include bitness even for DJGPP. + * Changed "(* bit)" to "(*-bit)" + ; NOTE: We have __ARCH*BIT__ but this macro is misleading + and cannot be used properly on platforms where the + compiler is able to generate multiple targets in + one build pass. Such system is Darwin/OSX. + I'd suggest to consider removing this macro, and + rather adding a function to return bitness. + Any opininons? + 2008-10-26 22:25 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * source/common/hbfopen.c * Changed hb_fopen() to use fopen_s(), secure version of diff --git a/harbour/source/common/hbver.c b/harbour/source/common/hbver.c index c95779bb5c..b1b28f6bda 100644 --- a/harbour/source/common/hbver.c +++ b/harbour/source/common/hbver.c @@ -528,22 +528,18 @@ char * hb_verCompiler( void ) hb_strncpy( pszCompiler, "(unknown)", COMPILER_BUF_SIZE - 1 ); #if defined(__DJGPP__) - snprintf( szSub, sizeof( szSub ), " (DJGPP %i.%02i)", ( int ) __DJGPP__, ( int ) __DJGPP_MINOR__ ); hb_strncat( pszCompiler, szSub, COMPILER_BUF_SIZE - 1 ); - -#else +#endif #if defined( HB_ARCH_16BIT ) - hb_strncat( pszCompiler, " (16 bit)", COMPILER_BUF_SIZE - 1 ); + hb_strncat( pszCompiler, " (16-bit)", COMPILER_BUF_SIZE - 1 ); #elif defined( HB_ARCH_32BIT ) - hb_strncat( pszCompiler, " (32 bit)", COMPILER_BUF_SIZE - 1 ); + hb_strncat( pszCompiler, " (32-bit)", COMPILER_BUF_SIZE - 1 ); #elif defined( HB_ARCH_64BIT ) - hb_strncat( pszCompiler, " (64 bit)", COMPILER_BUF_SIZE - 1 ); + hb_strncat( pszCompiler, " (64-bit)", COMPILER_BUF_SIZE - 1 ); #endif -#endif - return pszCompiler; }