diff --git a/harbour/ChangeLog b/harbour/ChangeLog index da10aac951..f29a94ec8c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,35 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-23 10:12 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/vm/estack.c + * src/vm/fm.c + * src/vm/garbage.c + % Deleted unnecessary OS/2 INCL_* constant definitions. + + * src/vm/cmdarg.c + * src/vm/thread.c + * src/vm/dynlibhb.c + + Added comment for some exception where OS/2 INCL_ constants + hace to be defined before Harbour headers. (because hbstack.h + will include os2.h through hbthread.h in MT build-pass) + + * src/vm/extrap.c + * src/common/hbgete.c + * src/common/hbffind.c + * src/common/hbver.c + * src/common/hbfsapi.c + * src/rtl/filesys.c + * src/rtl/diskspac.c + * src/rtl/gtos2/gtos2.c + * src/rtl/cputime.c + * src/rtl/disksphb.c + * contrib/hbtpathy/tpos2.c + * contrib/hbmzip/hbmzip.c + * contrib/hbqt/hbqt.h + % OS/2 '#define INCL_*' lines moved right before os2.h is included. + Now that os2.h isn't included by Harbour headers, this is possible. + 2010-02-23 09:44 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * include/hbdefs.h + / header inclusion (along with HB_OS_WIN_USED diff --git a/harbour/contrib/hbmzip/hbmzip.c b/harbour/contrib/hbmzip/hbmzip.c index 15c4662eed..9b31653005 100644 --- a/harbour/contrib/hbmzip/hbmzip.c +++ b/harbour/contrib/hbmzip/hbmzip.c @@ -51,9 +51,6 @@ * */ -#define INCL_DOSFILEMGR -#define INCL_ERRORS - #include "hbapi.h" #include "hbapiitm.h" #include "hbapierr.h" @@ -80,6 +77,8 @@ #elif defined( HB_OS_WIN ) #include #elif defined( HB_OS_OS2 ) + #define INCL_DOSFILEMGR + #define INCL_ERRORS #include #endif diff --git a/harbour/contrib/hbqt/hbqt.h b/harbour/contrib/hbqt/hbqt.h index 37456d4549..f25390d43b 100644 --- a/harbour/contrib/hbqt/hbqt.h +++ b/harbour/contrib/hbqt/hbqt.h @@ -57,13 +57,12 @@ #ifndef __HBQT_H #define __HBQT_H -#define OS2EMX_PLAIN_CHAR -#define INCL_BASE -#define INCL_PM - #include "hbapi.h" #if defined( HB_OS_OS2 ) +# define OS2EMX_PLAIN_CHAR +# define INCL_BASE +# define INCL_PM # include #endif diff --git a/harbour/contrib/hbtpathy/tpos2.c b/harbour/contrib/hbtpathy/tpos2.c index 205c8c75fa..64b1416213 100644 --- a/harbour/contrib/hbtpathy/tpos2.c +++ b/harbour/contrib/hbtpathy/tpos2.c @@ -51,12 +51,6 @@ * */ -#define INCL_BASE -#define INCL_DOS -#define INCL_DOSERROR -#define INCL_DOSDEVICES -#define INCL_DOSDEVIOCTL - #include "hbapi.h" #include "hbapiitm.h" #include "hbapifs.h" @@ -65,6 +59,12 @@ #include "telepath.ch" +#define INCL_BASE +#define INCL_DOS +#define INCL_DOSERROR +#define INCL_DOSDEVICES +#define INCL_DOSDEVIOCTL + #include HB_FUNC( __TP_INITPORTSPEED ) diff --git a/harbour/src/common/hbffind.c b/harbour/src/common/hbffind.c index 8fb14be59e..62ecc1b6d2 100644 --- a/harbour/src/common/hbffind.c +++ b/harbour/src/common/hbffind.c @@ -56,9 +56,6 @@ # define _LARGEFILE64_SOURCE #endif -#define INCL_DOSFILEMGR -#define INCL_DOSERRORS - #include "hbapi.h" #include "hbapifs.h" #include "hbvm.h" @@ -106,6 +103,9 @@ #elif defined( HB_OS_OS2 ) + #define INCL_DOSFILEMGR + #define INCL_DOSERRORS + #include #include diff --git a/harbour/src/common/hbfsapi.c b/harbour/src/common/hbfsapi.c index 31cff7c584..9ac653694c 100644 --- a/harbour/src/common/hbfsapi.c +++ b/harbour/src/common/hbfsapi.c @@ -50,10 +50,6 @@ * */ -/* OS2 */ -#define INCL_DOSFILEMGR /* File Manager values */ -#define INCL_DOSERRORS /* DOS error values */ - #include "hbapi.h" #include "hbapifs.h" #include "hb_io.h" @@ -68,6 +64,8 @@ #define FILE_ATTRIBUTE_DEVICE 0x00000040 #endif #elif defined( HB_OS_OS2 ) + #define INCL_DOSFILEMGR + #define INCL_DOSERRORS #include #include #elif defined( HB_OS_UNIX ) diff --git a/harbour/src/common/hbgete.c b/harbour/src/common/hbgete.c index 1d75f2ed8d..602638cd35 100644 --- a/harbour/src/common/hbgete.c +++ b/harbour/src/common/hbgete.c @@ -51,10 +51,7 @@ */ /* NOTE: Notice that this code is needed as ANSI C getenv() crashes - so badly when used from a Windows DLL. */ - -#define INCL_DOSMISC -#define INCL_ERRORS + badly when used from a Windows DLL. */ #include "hbapi.h" @@ -64,6 +61,8 @@ #include "hbwince.h" #endif #elif defined( HB_OS_OS2 ) + #define INCL_DOSMISC + #define INCL_ERRORS #include #endif diff --git a/harbour/src/common/hbver.c b/harbour/src/common/hbver.c index 374a837e3d..56b4fa1811 100644 --- a/harbour/src/common/hbver.c +++ b/harbour/src/common/hbver.c @@ -71,9 +71,6 @@ * */ -/* NOTE: For OS/2. Must be ahead of any and all #include statements */ -#define INCL_DOSMISC - #include "hbapi.h" #include "hbmemory.ch" @@ -92,6 +89,7 @@ #endif #elif defined( HB_OS_OS2 ) + #define INCL_DOSMISC #include #elif defined( HB_OS_DOS ) #include diff --git a/harbour/src/rtl/cputime.c b/harbour/src/rtl/cputime.c index 22cb0df548..4dafc845f3 100644 --- a/harbour/src/rtl/cputime.c +++ b/harbour/src/rtl/cputime.c @@ -50,10 +50,6 @@ * */ -#define INCL_DOS -#define INCL_DOSPROFILE -#define INCL_ERRORS - #include "hbapi.h" #include "hbdate.h" @@ -62,6 +58,9 @@ #include #endif #if defined( HB_OS_OS2 ) + #define INCL_DOS + #define INCL_DOSPROFILE + #define INCL_ERRORS #include #define BUFSIZE 16 * 1024 #include diff --git a/harbour/src/rtl/diskspac.c b/harbour/src/rtl/diskspac.c index 3c9ebd58ea..a2eb74cbda 100644 --- a/harbour/src/rtl/diskspac.c +++ b/harbour/src/rtl/diskspac.c @@ -54,10 +54,6 @@ return a (long) value, Harbour may return a (double) for large values, the decimal places are always set to zero, though. */ -/* NOTE: For OS/2. Must be ahead of any and all #include statements */ -#define INCL_BASE -#define INCL_DOSERRORS - #include "hbapi.h" #include "hbapierr.h" #include "hbapifs.h" @@ -80,6 +76,8 @@ #include "hbwince.h" #endif #elif defined( HB_OS_OS2 ) + #define INCL_BASE + #define INCL_DOSERRORS #include #elif defined( HB_OS_DOS ) #include diff --git a/harbour/src/rtl/disksphb.c b/harbour/src/rtl/disksphb.c index 706a817a8e..74f7ace31f 100644 --- a/harbour/src/rtl/disksphb.c +++ b/harbour/src/rtl/disksphb.c @@ -50,10 +50,6 @@ * */ -/* NOTE: For OS/2. Must be ahead of any and all #include statements */ -#define INCL_BASE -#define INCL_DOSERRORS - #include "hbapi.h" #include "hbapierr.h" #include "hbapifs.h" @@ -70,6 +66,8 @@ #include "hbwince.h" #endif #elif defined( HB_OS_OS2 ) + #define INCL_BASE + #define INCL_DOSERRORS #include #elif defined( HB_OS_DOS ) #include diff --git a/harbour/src/rtl/filesys.c b/harbour/src/rtl/filesys.c index d8d5a63812..5f404f6756 100644 --- a/harbour/src/rtl/filesys.c +++ b/harbour/src/rtl/filesys.c @@ -99,11 +99,6 @@ # define _GNU_SOURCE #endif -/* OS2 */ -#define INCL_DOSFILEMGR /* File Manager values */ -#define INCL_DOSERRORS /* DOS error values */ -#define INCL_DOSDATETIME /* DATETIME functions */ - #include "hbapi.h" #include "hbvm.h" #include "hbstack.h" @@ -186,6 +181,9 @@ #include #include #elif defined( HB_OS_OS2 ) + #define INCL_DOSFILEMGR + #define INCL_DOSERRORS + #define INCL_DOSDATETIME #include #include #include diff --git a/harbour/src/rtl/gtos2/gtos2.c b/harbour/src/rtl/gtos2/gtos2.c index 513765852d..fa636066eb 100644 --- a/harbour/src/rtl/gtos2/gtos2.c +++ b/harbour/src/rtl/gtos2/gtos2.c @@ -90,14 +90,6 @@ /* NOTE: User programs should never call this layer directly! */ -#define INCL_BASE -#define INCL_VIO -#define INCL_KBD -#define INCL_MOU -#define INCL_DOSMEMMGR -#define INCL_DOSPROCESS -#define INCL_NOPMAPI - #define HB_GT_NAME OS2 #include "hbgtcore.h" @@ -106,6 +98,14 @@ #include "hbapiitm.h" #include "inkey.ch" +#define INCL_BASE +#define INCL_VIO +#define INCL_KBD +#define INCL_MOU +#define INCL_DOSMEMMGR +#define INCL_DOSPROCESS +#define INCL_NOPMAPI + #include /* convert 16:16 address to 0:32 */ diff --git a/harbour/src/vm/cmdarg.c b/harbour/src/vm/cmdarg.c index 2da58a987a..41d7e87137 100644 --- a/harbour/src/vm/cmdarg.c +++ b/harbour/src/vm/cmdarg.c @@ -50,6 +50,8 @@ * */ +/* NOTE: Need to have these before Harbour headers, + because in MT mode, they will automatically #include . */ #define INCL_DOSPROCESS #define INCL_DOSERRORS #define INCL_DOSMODULEMGR diff --git a/harbour/src/vm/dynlibhb.c b/harbour/src/vm/dynlibhb.c index 196f3a3071..ce00b6cbf2 100644 --- a/harbour/src/vm/dynlibhb.c +++ b/harbour/src/vm/dynlibhb.c @@ -55,6 +55,8 @@ * */ +/* NOTE: Need to have these before Harbour headers, + because in MT mode, they will automatically #include . */ #define INCL_DOSMODULEMGR #define INCL_ERRORS diff --git a/harbour/src/vm/estack.c b/harbour/src/vm/estack.c index 9ad945f4ba..39017a325c 100644 --- a/harbour/src/vm/estack.c +++ b/harbour/src/vm/estack.c @@ -52,9 +52,6 @@ #define HB_STACK_PRELOAD -#define INCL_DOSPROCESS - - #include "hbvmopt.h" #include "hbapi.h" #include "hbapicls.h" diff --git a/harbour/src/vm/extrap.c b/harbour/src/vm/extrap.c index 8c2619b2e3..180f05bc44 100644 --- a/harbour/src/vm/extrap.c +++ b/harbour/src/vm/extrap.c @@ -68,9 +68,6 @@ * */ -#define INCL_DOSEXCEPTIONS -#define INCL_ERRORS - #include "hbapi.h" #include "hbvm.h" #include "hbapifs.h" @@ -97,6 +94,8 @@ # define TH32CS_SNAPMODULE32 0 # endif #elif defined( HB_OS_OS2 ) +# define INCL_DOSEXCEPTIONS +# define INCL_ERRORS # include #endif diff --git a/harbour/src/vm/fm.c b/harbour/src/vm/fm.c index 75dbdd0eb0..e830c580cb 100644 --- a/harbour/src/vm/fm.c +++ b/harbour/src/vm/fm.c @@ -81,13 +81,6 @@ # endif #endif -/* NOTE: For OS/2. Must be ahead of any and all #include statements */ -#define INCL_BASE -#define INCL_DOSMISC -#define INCL_DOSERRORS -#define INCL_DOSPROCESS - - /* malloc.h has been obsoleted by stdlib.h, which is included via hbvmpub.h, which is include via hbapi.h #include diff --git a/harbour/src/vm/garbage.c b/harbour/src/vm/garbage.c index 6e6453b01b..86bf6a8b4f 100644 --- a/harbour/src/vm/garbage.c +++ b/harbour/src/vm/garbage.c @@ -50,10 +50,6 @@ * */ -#define INCL_DOSPROCESS -#define INCL_DOSDATETIME -#define INCL_NOPMAPI - #include "hbvmopt.h" #include "hbapi.h" #include "hbstack.h" diff --git a/harbour/src/vm/thread.c b/harbour/src/vm/thread.c index b203a1bb15..2a6944d3b7 100644 --- a/harbour/src/vm/thread.c +++ b/harbour/src/vm/thread.c @@ -77,6 +77,8 @@ delivered. */ +/* NOTE: Need to have these before Harbour headers, + because in MT mode, they will automatically #include . */ #define INCL_DOSSEMAPHORES #define INCL_DOSPROCESS