Index: inc/solar.h =================================================================== RCS file: /cvs/util/tools/inc/solar.h,v retrieving revision 1.34.6.1 diff -u -r1.34.6.1 solar.h --- inc/solar.h 15 Feb 2004 18:19:38 -0000 1.34.6.1 +++ inc/solar.h 20 Feb 2004 00:08:51 -0000 @@ -63,6 +63,10 @@ #ifndef _SOLAR_H #define _SOLAR_H +#ifndef _SAL_TYPES_H_ +#include +#endif + /*** common solar defines ***********************************/ #ifndef TRUE @@ -81,65 +85,33 @@ #define _SOLAR__PRIVATE 1 #define __REFERENCED 0 -/*** common solar types ******************************************/ - -typedef unsigned char BOOL; -typedef unsigned char BYTE; -typedef unsigned short USHORT; -typedef unsigned long ULONG; -typedef int FASTBOOL; +/*** common solar types ********************************************/ +/* NOTE: these types are deprecated, or soon will be. They should */ +/* not be used in new code, and should be replaced with their */ +/* corresponding types from sal/types.h in old code when possible. */ +/* Previous typedefs from before sal convergence are in comments */ +/* to the right of the new types. */ + +typedef sal_Bool BOOL; /* typedef unsigned char BOOL; */ +typedef sal_uInt8 BYTE; /* typedef unsigned char BYTE; */ +typedef sal_uInt16 USHORT; /* typedef unsigned short USHORT; */ +typedef sal_uInt32 ULONG; /* typedef unsigned long ULONG; */ +typedef int FASTBOOL; #ifndef _SOLAR_NOUINT +typedef sal_Int16 INT16; /* typedef short INT16; */ +typedef sal_uInt16 UINT16; /* typedef unsigned short UINT16; */ +typedef sal_Char INT8; /* typedef char INT8; */ +typedef sal_uInt8 UINT8; /* typedef unsigned char UINT8; */ + /* types with exact defined size (not just the minimum size) */ -#if defined ALPHA && !defined WNT -typedef long INT64; -typedef unsigned long UINT64; -typedef int INT32; -typedef unsigned int UINT32; -typedef short INT16; -typedef unsigned short UINT16; -typedef char INT8; -typedef unsigned char UINT8; -#else -#if !defined(_MSC_VER) || defined(_MSC_VER) && (_MSC_VER < 1200) || (_MSC_VER >= 1200 ) && !defined(VCL_NEED_BASETSD ) -typedef void INT64; -typedef void UINT64; -typedef long INT32; -typedef unsigned long UINT32; -#endif -typedef short INT16; -typedef unsigned short UINT16; -typedef signed char INT8; -typedef unsigned char UINT8; -#endif +typedef sal_Int64 INT64; /* typedef long INT64; previously "void" on Windows */ +typedef sal_uInt64 UINT64; /* typedef unsigned long UINT64; previously "void" on Windows */ +typedef sal_Int32 INT32; /* typedef int INT32; previously "long" on Windows */ +typedef sal_uInt32 UINT32; /* typedef unsigned int UINT32; previously "unsigned long" on Windows */ #endif /* _SOLAR_NOUINT */ -/*** description of platform and compiler properties *******************/ - -#ifndef _SOLAR_NODESCRIPTION -#if defined UNX -#include -#else -#if defined WNT /* auf PC's */ -#define __LITTLEENDIAN -#define __ALIGNMENT2 1 -#define __ALIGNMENT4 1 -#define __ALIGNMENT8 1 -#define __STACKALIGNMENT 4 -#define __STACKDIRECTION -1 -#define __SIZEOFCHAR 1 -#define __SIZEOFSHORT 2 -#define __SIZEOFINT 4 -#define __SIZEOFLONG 4 -#define __SIZEOFPOINTER 4 -#define __SIZEOFDOUBLE 8 -#define __IEEEDOUBLE -#endif -#endif -#endif /* _SOLAR_NODESCRIPTION */ - - /*** misc. macros to leverage platform and compiler differences ********/ #define DELETEZ( p ) ( delete p,p = 0 ) @@ -160,8 +132,6 @@ #if defined UNX #define ILLEGAL_POINTER ((void*)1) -#elif defined ( MAC ) -#define ILLEGAL_POINTER ((void*)0xEFEFEFEF) #else #define ILLEGAL_POINTER NULL #endif @@ -179,15 +149,15 @@ typedef BYTE SVBT64[8]; #ifdef __cplusplus -#ifndef _SOLAR_NODESCRIPTION + inline BYTE SVBT8ToByte ( const SVBT8 p ) { return p[0]; } -#if defined __LITTLEENDIAN && __ALIGNMENT2 == 1 +#if defined SAL_TYPES_LITTLEENDIAN && SAL_TYPES_ALIGNMENT2 == 1 inline USHORT SVBT16ToShort( const SVBT16 p ) { return *(USHORT*)p; } #else inline USHORT SVBT16ToShort( const SVBT16 p ) { return (USHORT)p[0] + ((USHORT)p[1] << 8); } #endif -#if defined __LITTLEENDIAN && __ALIGNMENT4 == 1 +#if defined SAL_TYPES_LITTLEENDIAN && SAL_TYPES_ALIGNMENT4 == 1 inline ULONG SVBT32ToLong ( const SVBT32 p ) { return *(ULONG*)p; } #else inline ULONG SVBT32ToLong ( const SVBT32 p ) { return (ULONG)p[0] @@ -195,11 +165,11 @@ + ((ULONG)p[2] << 16) + ((ULONG)p[3] << 24); } #endif -#if !defined __IEEEDOUBLE || __SIZEOFDOUBLE != 8 -#error sorry, not implemented -#elif defined __LITTLEENDIAN && __ALIGNMENT8 == 1 +#if !defined SAL_TYPES_IEEEDOUBLE || SAL_TYPES_SIZEOFDOUBLE != 8 +#error "Sorry, !defined SAL_TYPES_IEEEDOUBLE || SAL_TYPES_SIZEOFDOUBLE != 8 is not implemented" +#elif defined SAL_TYPES_LITTLEENDIAN && SAL_TYPES_ALIGNMENT8 == 1 inline double SVBT64ToDouble( const SVBT64 p ) { return *(double*)p; } -#elif defined __LITTLEENDIAN +#elif defined SAL_TYPES_LITTLEENDIAN inline double SVBT64ToDouble( const SVBT64 p ) { double n; ((BYTE*)&n)[0] = p[0]; ((BYTE*)&n)[1] = p[1]; @@ -224,13 +194,13 @@ #endif inline void ByteToSVBT8 ( BYTE n, SVBT8 p ) { p[0] = n; } -#if defined __LITTLEENDIAN && __ALIGNMENT2 == 1 +#if defined SAL_TYPES_LITTLEENDIAN && SAL_TYPES_ALIGNMENT2 == 1 inline void ShortToSVBT16( USHORT n, SVBT16 p ) { *(USHORT*)p = n; } #else inline void ShortToSVBT16( USHORT n, SVBT16 p ) { p[0] = (BYTE) n; p[1] = (BYTE)(n >> 8); } #endif -#if defined __LITTLEENDIAN && __ALIGNMENT4 == 1 +#if defined SAL_TYPES_LITTLEENDIAN && SAL_TYPES_ALIGNMENT4 == 1 inline void LongToSVBT32 ( ULONG n, SVBT32 p ) { *(ULONG*)p = n; } #else inline void LongToSVBT32 ( ULONG n, SVBT32 p ) { p[0] = (BYTE) n; @@ -238,11 +208,11 @@ p[2] = (BYTE)(n >> 16); p[3] = (BYTE)(n >> 24); } #endif -#if !defined __IEEEDOUBLE || __SIZEOFDOUBLE != 8 -#error sorry, not implemented -#elif defined __LITTLEENDIAN && __ALIGNMENT8 == 1 +#if !defined SAL_TYPES_IEEEDOUBLE || SAL_TYPES_SIZEOFDOUBLE != 8 +#error "Sorry, !defined SAL_TYPES_IEEEDOUBLE || SAL_TYPES_SIZEOFDOUBLE != 8 is not implemented." +#elif defined SAL_TYPES_LITTLEENDIAN && SAL_TYPES_ALIGNMENT8 == 1 inline void DoubleToSVBT64( double n, SVBT64 p ) { *(double*)p = n; } -#elif defined __LITTLEENDIAN +#elif defined SAL_TYPES_LITTLEENDIAN inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((BYTE*)&n)[0]; p[1] = ((BYTE*)&n)[1]; p[2] = ((BYTE*)&n)[2]; @@ -260,7 +230,6 @@ p[5] = ((BYTE*)&n)[2]; p[6] = ((BYTE*)&n)[1]; p[7] = ((BYTE*)&n)[0]; } -#endif #endif #endif #endif Index: prj/build.lst =================================================================== RCS file: /cvs/util/tools/prj/build.lst,v retrieving revision 1.15 diff -u -r1.15 build.lst --- prj/build.lst 20 Oct 2003 15:48:09 -0000 1.15 +++ prj/build.lst 20 Feb 2004 00:08:51 -0000 @@ -8,24 +8,23 @@ tl tools\prj usr7 - all tl_deliver NULL tl tools\prj usr42 - all tl_zn NULL tl tools\workben get - all tl_wben NULL -tl tools\source\solar nmake - u tl_sol NULL -tl tools\source\generic nmake - all tl_gen tl_fsys tl_sol.u NULL -tl tools\source\memtools nmake - all tl_mem tl_fsys tl_sol.u NULL -tl tools\source\memmgr nmake - all tl_mgr tl_fsys tl_sol.u NULL -tl tools\source\debug nmake - all tl_deb tl_fsys tl_sol.u NULL -tl tools\source\intntl nmake - all tl_int tl_fsys tl_sol.u NULL -tl tools\source\datetime nmake - all tl_dat tl_fsys tl_sol.u NULL -tl tools\source\stream nmake - all tl_str tl_fsys tl_sol.u NULL -tl tools\source\rc nmake - all tl_rc tl_fsys tl_sol.u NULL -tl tools\source\ref nmake - all tl_ref tl_fsys tl_sol.u NULL -tl tools\source\fsys nmake - all tl_fsys tl_sol.u NULL -tl tools\source\zcodec nmake - all tl_zco tl_fsys tl_sol.u NULL -tl tools\source\communi nmake - all tl_com tl_fsys tl_sol.u NULL -tl tools\source\inet nmake - all tl_inet tl_fsys tl_sol.u NULL -tl tools\source\timestamp nmake - all tl_tstamp tl_fsys tl_sol.u NULL -tl tools\source\string nmake - all tl_string tl_fsys tl_sol.u NULL +tl tools\source\generic nmake - all tl_gen tl_fsys NULL +tl tools\source\memtools nmake - all tl_mem tl_fsys NULL +tl tools\source\memmgr nmake - all tl_mgr tl_fsys NULL +tl tools\source\debug nmake - all tl_deb tl_fsys NULL +tl tools\source\intntl nmake - all tl_int tl_fsys NULL +tl tools\source\datetime nmake - all tl_dat tl_fsys NULL +tl tools\source\stream nmake - all tl_str tl_fsys NULL +tl tools\source\rc nmake - all tl_rc tl_fsys NULL +tl tools\source\ref nmake - all tl_ref tl_fsys NULL +tl tools\source\fsys nmake - all tl_fsys NULL +tl tools\source\zcodec nmake - all tl_zco tl_fsys NULL +tl tools\source\communi nmake - all tl_com tl_fsys NULL +tl tools\source\inet nmake - all tl_inet tl_fsys NULL +tl tools\source\timestamp nmake - all tl_tstamp tl_fsys NULL +tl tools\source\string nmake - all tl_string tl_fsys NULL tl tools\win\source\dll nmake - w tl_dllw NULL -tl tools\unx\source\dll nmake - u tl_dllu tl_sol.u NULL +tl tools\unx\source\dll nmake - u tl_dllu NULL tl tools\mac\source nmake - m tl_dllm NULL tl tools\util nmake - all tl_utl tl_com tl_dat tl_deb tl_dllm.m tl_dllu.u tl_dllw.w tl_fsys tl_gen tl_inet tl_int tl_mem tl_mgr tl_rc tl_ref tl_str tl_string tl_tstamp tl_zco NULL tl tools\symbol nmake - all tl_sym tl_utl NULL