New ACC version.
committer: mfx <mfx> 1089687481 +0000
This commit is contained in:
+2
-2
@@ -27,7 +27,7 @@
|
|||||||
#ifndef __ACC_H_INCLUDED
|
#ifndef __ACC_H_INCLUDED
|
||||||
#define __ACC_H_INCLUDED 1
|
#define __ACC_H_INCLUDED 1
|
||||||
|
|
||||||
#define ACC_VERSION 20040706L
|
#define ACC_VERSION 20040712L
|
||||||
|
|
||||||
#if !defined(ACC_CONFIG_INCLUDE)
|
#if !defined(ACC_CONFIG_INCLUDE)
|
||||||
# define ACC_CONFIG_INCLUDE(file) file
|
# define ACC_CONFIG_INCLUDE(file) file
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
#elif 0 && defined(__C251__)
|
#elif 0 && defined(__C251__)
|
||||||
# pragma warning disable = 322
|
# pragma warning disable = 322
|
||||||
#endif
|
#endif
|
||||||
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
|
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__)
|
||||||
# if (_MSC_VER >= 1300)
|
# if (_MSC_VER >= 1300)
|
||||||
# pragma warning(disable: 4668)
|
# pragma warning(disable: 4668)
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
+8
-6
@@ -438,7 +438,8 @@
|
|||||||
# if ((_MSC_VER < 800) && ACC_OS_WIN16)
|
# if ((_MSC_VER < 800) && ACC_OS_WIN16)
|
||||||
# undef HAVE_ALLOCA
|
# undef HAVE_ALLOCA
|
||||||
# endif
|
# endif
|
||||||
# if (_MSC_VER < 1000) && defined(__cplusplus)
|
# if (ACC_ARCH_IA16) && defined(__cplusplus)
|
||||||
|
# undef HAVE_LONGJMP
|
||||||
# undef HAVE_SETJMP
|
# undef HAVE_SETJMP
|
||||||
# endif
|
# endif
|
||||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
|
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
|
||||||
@@ -522,7 +523,7 @@
|
|||||||
# if (__WATCOMC__ < 1100)
|
# if (__WATCOMC__ < 1100)
|
||||||
# undef HAVE_SNPRINTF
|
# undef HAVE_SNPRINTF
|
||||||
# undef HAVE_VSNPRINTF
|
# undef HAVE_VSNPRINTF
|
||||||
# else
|
# elif (__WATCOMC__ < 1200)
|
||||||
# define snprintf _snprintf
|
# define snprintf _snprintf
|
||||||
# define vsnprintf _vsnprintf
|
# define vsnprintf _vsnprintf
|
||||||
# endif
|
# endif
|
||||||
@@ -594,7 +595,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#if ((SIZEOF_LONG) > 0 && (SIZEOF_LONG) < 8)
|
#if ((SIZEOF_LONG) > 0 && (SIZEOF_LONG) < 8)
|
||||||
#if (ACC_CC_GNUC)
|
#if (ACC_ARCH_IA16 && ACC_CC_DMC)
|
||||||
|
#elif (ACC_CC_GNUC)
|
||||||
# define SIZEOF_LONG_LONG 8
|
# define SIZEOF_LONG_LONG 8
|
||||||
# define SIZEOF_UNSIGNED_LONG_LONG 8
|
# define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||||
#elif (ACC_OS_WIN64)
|
#elif (ACC_OS_WIN64)
|
||||||
@@ -603,7 +605,7 @@
|
|||||||
#elif (ACC_ARCH_IA32 && (ACC_CC_DMC))
|
#elif (ACC_ARCH_IA32 && (ACC_CC_DMC))
|
||||||
# define SIZEOF_LONG_LONG 8
|
# define SIZEOF_LONG_LONG 8
|
||||||
# define SIZEOF_UNSIGNED_LONG_LONG 8
|
# define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||||
#elif (ACC_ARCH_IA32 && (ACC_CC_SYMANTECC && __SC__ >= 0x700))
|
#elif (ACC_ARCH_IA32 && (ACC_CC_SYMANTECC && (__SC__ >= 0x700)))
|
||||||
# define SIZEOF_LONG_LONG 8
|
# define SIZEOF_LONG_LONG 8
|
||||||
# define SIZEOF_UNSIGNED_LONG_LONG 8
|
# define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||||
#elif (ACC_ARCH_IA32 && (ACC_CC_INTELC && defined(__linux__)))
|
#elif (ACC_ARCH_IA32 && (ACC_CC_INTELC && defined(__linux__)))
|
||||||
@@ -615,11 +617,11 @@
|
|||||||
#elif (ACC_ARCH_IA32 && (ACC_CC_INTELC || ACC_CC_MSC))
|
#elif (ACC_ARCH_IA32 && (ACC_CC_INTELC || ACC_CC_MSC))
|
||||||
# define SIZEOF___INT64 8
|
# define SIZEOF___INT64 8
|
||||||
# define SIZEOF_UNSIGNED___INT64 8
|
# define SIZEOF_UNSIGNED___INT64 8
|
||||||
#elif (ACC_ARCH_IA32 && (ACC_CC_BORLANDC && __BORLANDC__ >= 0x0520))
|
#elif (ACC_ARCH_IA32 && (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0520)))
|
||||||
/* INFO: unsigned __int64 is somewhat broken in 0x0520; fixed in 0x0530 */
|
/* INFO: unsigned __int64 is somewhat broken in 0x0520; fixed in 0x0530 */
|
||||||
# define SIZEOF___INT64 8
|
# define SIZEOF___INT64 8
|
||||||
# define SIZEOF_UNSIGNED___INT64 8
|
# define SIZEOF_UNSIGNED___INT64 8
|
||||||
#elif (ACC_ARCH_IA32 && (ACC_CC_WATCOMC && __WATCOMC__ >= 1100))
|
#elif (ACC_ARCH_IA32 && (ACC_CC_WATCOMC && (__WATCOMC__ >= 1100)))
|
||||||
# define SIZEOF___INT64 8
|
# define SIZEOF___INT64 8
|
||||||
# define SIZEOF_UNSIGNED___INT64 8
|
# define SIZEOF_UNSIGNED___INT64 8
|
||||||
#elif (ACC_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64))
|
#elif (ACC_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64))
|
||||||
|
|||||||
+5
-1
@@ -21,7 +21,11 @@
|
|||||||
* ...
|
* ...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__INTEL_COMPILER)
|
#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__)
|
||||||
|
# define ACC_CC_CILLY 1
|
||||||
|
# define ACC_INFO_CC "Cilly"
|
||||||
|
# define ACC_INFO_CCVER "unknown"
|
||||||
|
#elif defined(__INTEL_COMPILER)
|
||||||
# define ACC_CC_INTELC 1
|
# define ACC_CC_INTELC 1
|
||||||
# define ACC_INFO_CC "Intel C"
|
# define ACC_INFO_CC "Intel C"
|
||||||
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__INTEL_COMPILER)
|
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__INTEL_COMPILER)
|
||||||
|
|||||||
@@ -81,6 +81,8 @@
|
|||||||
// check basic arithmetics
|
// check basic arithmetics
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
|
ACCCHK_ASSERT(1 == 1)
|
||||||
|
|
||||||
ACCCHK_ASSERT(__ACC_INT_MAX(2) == 1)
|
ACCCHK_ASSERT(__ACC_INT_MAX(2) == 1)
|
||||||
ACCCHK_ASSERT(__ACC_INT_MAX(8) == 127)
|
ACCCHK_ASSERT(__ACC_INT_MAX(8) == 127)
|
||||||
ACCCHK_ASSERT(__ACC_INT_MAX(16) == 32767)
|
ACCCHK_ASSERT(__ACC_INT_MAX(16) == 32767)
|
||||||
@@ -103,7 +105,11 @@
|
|||||||
ACCCHK_ASSERT(sizeof(signed char) == sizeof(char))
|
ACCCHK_ASSERT(sizeof(signed char) == sizeof(char))
|
||||||
ACCCHK_ASSERT(sizeof(unsigned char) == sizeof(char))
|
ACCCHK_ASSERT(sizeof(unsigned char) == sizeof(char))
|
||||||
ACCCHK_ASSERT(sizeof(char) == 1)
|
ACCCHK_ASSERT(sizeof(char) == 1)
|
||||||
|
#if (ACC_CC_CILLY)
|
||||||
|
/* CIL is broken */
|
||||||
|
#else
|
||||||
ACCCHK_ASSERT(sizeof(char) == sizeof((char)0))
|
ACCCHK_ASSERT(sizeof(char) == sizeof((char)0))
|
||||||
|
#endif
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
ACCCHK_ASSERT(sizeof('\0') == sizeof(char))
|
ACCCHK_ASSERT(sizeof('\0') == sizeof(char))
|
||||||
#else
|
#else
|
||||||
@@ -124,7 +130,11 @@
|
|||||||
ACCCHK_ASSERT(sizeof(short) == sizeof(unsigned short))
|
ACCCHK_ASSERT(sizeof(short) == sizeof(unsigned short))
|
||||||
ACCCHK_ASSERT(sizeof(short) >= 2)
|
ACCCHK_ASSERT(sizeof(short) >= 2)
|
||||||
ACCCHK_ASSERT(sizeof(short) >= sizeof(char))
|
ACCCHK_ASSERT(sizeof(short) >= sizeof(char))
|
||||||
|
#if (ACC_CC_CILLY)
|
||||||
|
/* CIL is broken */
|
||||||
|
#else
|
||||||
ACCCHK_ASSERT(sizeof(short) == sizeof((short)0))
|
ACCCHK_ASSERT(sizeof(short) == sizeof((short)0))
|
||||||
|
#endif
|
||||||
#if (SIZEOF_SHORT > 0)
|
#if (SIZEOF_SHORT > 0)
|
||||||
ACCCHK_ASSERT(sizeof(short) == SIZEOF_SHORT)
|
ACCCHK_ASSERT(sizeof(short) == SIZEOF_SHORT)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+3
-7
@@ -17,14 +17,12 @@
|
|||||||
// acc_alignof() / acc_inline
|
// acc_alignof() / acc_inline
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#if (ACC_CC_GNUC)
|
#if (ACC_CC_CILLY || ACC_CC_GNUC || ACC_CC_PGI)
|
||||||
# define acc_alignof(e) __alignof__(e)
|
# define acc_alignof(e) __alignof__(e)
|
||||||
#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 700))
|
#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 700))
|
||||||
# define acc_alignof(e) __alignof__(e)
|
# define acc_alignof(e) __alignof__(e)
|
||||||
#elif (ACC_CC_MSC && (_MSC_VER >= 1300))
|
#elif (ACC_CC_MSC && (_MSC_VER >= 1300))
|
||||||
# define acc_alignof(e) __alignof(e)
|
# define acc_alignof(e) __alignof(e)
|
||||||
#elif (ACC_CC_PGI)
|
|
||||||
# define acc_alignof(e) __alignof__(e)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (ACC_CC_TURBOC && (__TURBOC__ <= 0x0295))
|
#if (ACC_CC_TURBOC && (__TURBOC__ <= 0x0295))
|
||||||
@@ -32,16 +30,14 @@
|
|||||||
# define acc_inline inline
|
# define acc_inline inline
|
||||||
#elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
|
#elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
|
||||||
# define acc_inline __inline
|
# define acc_inline __inline
|
||||||
|
#elif (ACC_CC_CILLY || ACC_CC_GNUC || ACC_CC_PGI)
|
||||||
|
# define acc_inline __inline__
|
||||||
#elif (ACC_CC_DMC)
|
#elif (ACC_CC_DMC)
|
||||||
# define acc_inline __inline
|
# define acc_inline __inline
|
||||||
#elif (ACC_CC_GNUC)
|
|
||||||
# define acc_inline __inline__
|
|
||||||
#elif (ACC_CC_INTELC)
|
#elif (ACC_CC_INTELC)
|
||||||
# define acc_inline __inline
|
# define acc_inline __inline
|
||||||
#elif (ACC_CC_MSC && (_MSC_VER >= 1000))
|
#elif (ACC_CC_MSC && (_MSC_VER >= 1000))
|
||||||
# define acc_inline __inline
|
# define acc_inline __inline
|
||||||
#elif (ACC_CC_PGI)
|
|
||||||
# define acc_inline __inline__
|
|
||||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
||||||
# define acc_inline inline
|
# define acc_inline inline
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -271,6 +271,8 @@ __acc_gnuc_extension__ typedef unsigned long long acc_ullong_t;
|
|||||||
# define __acc_cdecl_sighandler __pascal
|
# define __acc_cdecl_sighandler __pascal
|
||||||
# elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
|
# elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
|
||||||
# define __acc_cdecl_sighandler _stdcall
|
# define __acc_cdecl_sighandler _stdcall
|
||||||
|
# elif (ACC_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE)
|
||||||
|
# define __acc_cdecl_sighandler __clrcall
|
||||||
# elif (ACC_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
|
# elif (ACC_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
|
||||||
# if defined(_DLL)
|
# if defined(_DLL)
|
||||||
# define __acc_cdecl_sighandler _far _cdecl _loadds
|
# define __acc_cdecl_sighandler _far _cdecl _loadds
|
||||||
|
|||||||
@@ -154,10 +154,10 @@ ACCLIB_PUBLIC(acc_hvoid_p, acc_ascii_hmemimem) (const acc_hvoid_p p, acc_hsize_t
|
|||||||
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrcpy) (acc_hchar_p d, const acc_hchar_p s)
|
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrcpy) (acc_hchar_p d, const acc_hchar_p s)
|
||||||
{
|
{
|
||||||
acc_hchar_p dest = d;
|
acc_hchar_p dest = d;
|
||||||
for (;;) {
|
while ((*d = *s) != 0) {
|
||||||
if ((*d = *s) == 0) return dest;
|
|
||||||
++d; ++s;
|
++d; ++s;
|
||||||
}
|
}
|
||||||
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -165,10 +165,10 @@ ACCLIB_PUBLIC(acc_hchar_p, acc_hstrcat) (acc_hchar_p d, const acc_hchar_p s)
|
|||||||
{
|
{
|
||||||
acc_hchar_p dest = d;
|
acc_hchar_p dest = d;
|
||||||
while (*d) ++d;
|
while (*d) ++d;
|
||||||
for (;;) {
|
while ((*d = *s) != 0) {
|
||||||
if ((*d = *s) == 0) return dest;
|
|
||||||
++d; ++s;
|
++d; ++s;
|
||||||
}
|
}
|
||||||
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
ACC_EXTERN_C int __acc_cdecl __setargv(void);
|
ACC_EXTERN_C int __acc_cdecl __setargv(void);
|
||||||
|
ACC_EXTERN_C int __acc_cdecl _setargv(void);
|
||||||
ACC_EXTERN_C int __acc_cdecl _setargv(void) { return __setargv(); }
|
ACC_EXTERN_C int __acc_cdecl _setargv(void) { return __setargv(); }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -38,6 +39,7 @@ ACC_EXTERN_C int __acc_cdecl _setargv(void) { return __setargv(); }
|
|||||||
#if (ACC_CC_INTELC || ACC_CC_MSC)
|
#if (ACC_CC_INTELC || ACC_CC_MSC)
|
||||||
|
|
||||||
ACC_EXTERN_C int __acc_cdecl __setargv(void);
|
ACC_EXTERN_C int __acc_cdecl __setargv(void);
|
||||||
|
ACC_EXTERN_C int __acc_cdecl _setargv(void);
|
||||||
ACC_EXTERN_C int __acc_cdecl _setargv(void) { return __setargv(); }
|
ACC_EXTERN_C int __acc_cdecl _setargv(void) { return __setargv(); }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user