Przemek:
This is a request/answer I made to Maurilio Longo recently:
-------------------------------------------
> On other subject:
> xharbour\include\hbdefs.h have this line:
> #define HB_LONG_LONG_OFF
> while harbour does not, forcing to add it to build script
>
> What do you suggest, to add or not as default to hbdefs.h in Harbour SVN ?
>
If I remember correctly it was there because old versions of gcc did not
have
long long support.
I think we can remove it from xharbour as well, but right now I cannot build
it since there is not a bison 2.1 working on OS/2.
So, after we solve the bison problem I'll try to build xharbour without that
define as see what happens.
-------------------------------------------
Iam using gcc 3.3.5 and eComStation 1.2MR
You guided me years ago to build Harbour under OS/2 using:
#define HB_LONG_LONG_OFF
If I do not use HB_LONG_LONG_OFF I get many of these type messages:
------------------------------------------------------------
In file included from ../../../../include/hbvmpub.h:56,
from ../../../../include/hbapi.h:61,
from ../../hbfsapi.c:60:
../../../../include/hbdefs.h:224: warning: redefinition of `LONGLONG'
E:/usr/include/os2emx.h:254: warning: `LONGLONG' previously declared here
../../../../include/hbdefs.h:231: warning: redefinition of `ULONGLONG'
E:/usr/include/os2emx.h:257: warning: `ULONGLONG' previously declared here
------------------------------------------------------------
harbour/include/hbdefs.h contain:
------------------------------------------------------------
#ifndef HB_LONG_LONG_OFF
#if ! defined(_WINNT_H)
#if !defined(LONGLONG)
#if defined(__GNUC__)
typedef long long LONGLONG; <------ line 224
#else
typedef __int64 LONGLONG;
#endif
#endif
#if !defined(ULONGLONG)
#if defined(__GNUC__)
typedef unsigned long long ULONGLONG; <------ line 231
#else
typedef unsigned __int64 ULONGLONG;
#endif
#endif
#endif
------------------------------------------------------------
and /usr/include/os2emx.h contain:
------------------------------------------------------------
#ifndef INCL_LONGLONG_STRUCTS
typedef long long LONGLONG; <------ line 254
typedef LONGLONG *PLONGLONG;
typedef unsigned long long ULONGLONG; <------ line 257
typedef ULONGLONG *PULONGLONG;
#else
typedef struct _LONGLONG
{
ULONG ulLo;
LONG ulHi;
} LONGLONG;
typedef LONGLONG *PLONGLONG;
typedef struct _ULONGLONG
{
ULONG ulLo;
ULONG ulHi;
} ULONGLONG;
typedef ULONGLONG *PULONGLONG;
#endif
------------------------------------------------------------
Commenting lines 224, 231 in harbour/include/hbdefs.h Harbour build and
run without problems
How can be managed this case ? I suppose some kind of if/else/endif in
hbdefs.h to exclude redefinition in case of gcc under OS/2
David Macias
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour