Hi all, What would the preferred direction we should go in order to avoid C type name collisions with external packages, and OS APIs (like Windows API)?
Here's is an incomplete list of type names which may cause such problems: BOOL SCHAR, UCHAR, BYTE SHORT, USHORT INT, UINT LONG, ULONG INT32, UINT32 INT64, UINT64 If cleaned up, we could finally get rid of the HB_OS_WIN_USED hack and freely include "windows.h" anywhere in C code. It would allow us to integrate Harbour with any tools without having to worry about such collisions. OpenWatcom 1.8 gives hundreds of warnings for INT32. 1) One route is to prefix everything with HB_. HB_INT, HB_UINT. Pretty obvious, but a tad verbose and not very elengant for such basic types. 2) Using standard types: int, long, unsigned int. 3) Combination of the above: standard types for everything where we can be in sync with underlying compiler types, and HB_* special types whenever we want to enforce certain sizes in public Harbour APIs, or to override compiler limits for consistency, like Harbour string pointer/size, Harbour file pointer (HB_FOFFSET), Harbour array pointer/size, Harbour character type (HB_CHAR). One important point is to make above distinction and planning in advance and in full detail, before touching the source. +1) Regardless of the above we should keep legacy types for Clipper compatibility, so they should be moved to Clipper compatibility headers. Any thoughts? Brgds, Viktor
_______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour