diff --git a/ase/awk/makefile.bcc b/ase/awk/makefile.bcc index 3f79525a..790ee276 100644 --- a/ase/awk/makefile.bcc +++ b/ase/awk/makefile.bcc @@ -18,7 +18,6 @@ LD = ilink32 AR = tlib JAVAC = javac - CFLAGS_COMMON = -O2 -WM -WU -RT- -w -I../.. $(JNI_INC) CFLAGS_RELEASE = $(CFLAGS_COMMON) -DNDEBUG CFLAGS_DEBUG = $(CFLAGS_COMMON) -D_DEBUG @@ -32,7 +31,7 @@ LIBS = import32.lib cw32mt.lib all: lib jni lib: $(C_OBJS) - $(AR) $(OUT).lib @&&! + $(AR) aseawk.lib @&&! +-$(**: = &^ +-) ! diff --git a/ase/awk/rex.c b/ase/awk/rex.c index 25aa0240..f5be9770 100644 --- a/ase/awk/rex.c +++ b/ase/awk/rex.c @@ -1,5 +1,5 @@ /* - * $Id: rex.c,v 1.42 2006-11-15 05:49:22 bacon Exp $ + * $Id: rex.c,v 1.43 2006-11-19 06:15:25 bacon Exp $ */ #include @@ -1586,7 +1586,7 @@ xp_printf (ASE_T("__match occurrences: si = %d [%s]\n"), si, mat->match_ptr); return p; } -ase_bool_t __test_charset ( +static ase_bool_t __test_charset ( __matcher_t* matcher, const ase_byte_t* p, ase_size_t csc, ase_char_t c) { ase_size_t i; @@ -1595,20 +1595,20 @@ ase_bool_t __test_charset ( { ase_char_t c0, c1, c2; - c0 = *(ase_char_t*)p; + c0 = *(const ase_char_t*)p; p += ase_sizeof(c0); if (c0 == CHARSET_ONE) { - c1 = *(ase_char_t*)p; + c1 = *(const ase_char_t*)p; if (matcher->ignorecase) c1 = ASE_AWK_TOUPPER(matcher->awk, c1); if (c == c1) return ase_true; } else if (c0 == CHARSET_RANGE) { - c1 = *(ase_char_t*)p; + c1 = *(const ase_char_t*)p; p += ase_sizeof(c1); - c2 = *(ase_char_t*)p; + c2 = *(const ase_char_t*)p; if (matcher->ignorecase) { @@ -1619,7 +1619,7 @@ ase_bool_t __test_charset ( } else if (c0 == CHARSET_CLASS) { - c1 = *(ase_char_t*)p; + c1 = *(const ase_char_t*)p; if (__char_class[c1].func ( matcher->awk, c)) return ase_true; } diff --git a/ase/awk/run.c b/ase/awk/run.c index a75855ed..7625ea06 100644 --- a/ase/awk/run.c +++ b/ase/awk/run.c @@ -1,5 +1,5 @@ /* - * $Id: run.c,v 1.266 2006-11-18 15:36:57 bacon Exp $ + * $Id: run.c,v 1.267 2006-11-19 06:15:25 bacon Exp $ */ #include @@ -5644,10 +5644,14 @@ ase_char_t* ase_awk_format ( run->awk->syscas.sprintf ( run->sprintf.tmp, ase_countof(run->sprintf.tmp), - #ifdef _WIN32 - ASE_T("%I64d"), (__int64)l); - #else + #if ASE_SIZEOF_LONG_LONG > 0 ASE_T("%lld"), (long long)l); + #elif ASE_SIZEOF___INT64 > 0 + ASE_T("%I64d"), (__int64)l); + #elif ASE_SIZEOF_LONG > 0 + ASE_T("%ld"), (long)l); + #elif ASE_SIZEOF_INT > 0 + ASE_T("%d"), (int)l); #endif p = run->sprintf.tmp; @@ -5750,10 +5754,14 @@ ase_char_t* ase_awk_format ( run->awk->syscas.sprintf ( run->sprintf.tmp, ase_countof(run->sprintf.tmp), - #ifdef _WIN32 - ASE_T("%I64d"), (__int64)l); - #else + #if ASE_SIZEOF_LONG_LONG > 0 ASE_T("%lld"), (long long)l); + #elif ASE_SIZEOF___INT64 > 0 + ASE_T("%I64d"), (__int64)l); + #elif ASE_SIZEOF_LONG > 0 + ASE_T("%ld"), (long)l); + #elif ASE_SIZEOF_INT > 0 + ASE_T("%d"), (int)l); #endif p = run->sprintf.tmp; @@ -5787,9 +5795,23 @@ ase_char_t* ase_awk_format ( ase_char_t* p; int n; + #if ASE_SIZEOF_LONG_LONG > 0 FMT_CHAR (ASE_T('l')); FMT_CHAR (ASE_T('l')); FMT_CHAR (fmt[i]); + #elif ASE_SIZEOF___INT64 > 0 + FMT_CHAR (ASE_T('I')); + FMT_CHAR (ASE_T('6')); + FMT_CHAR (ASE_T('4')); + FMT_CHAR (fmt[i]); + #elif ASE_SIZEOF_LONG > 0 + FMT_CHAR (ASE_T('l')); + FMT_CHAR (fmt[i]); + #elif ASE_SIZEOF_INT > 0 + FMT_CHAR (fmt[i]); + #else + #error unsupported integer size + #endif if (args == ASE_NULL) { @@ -5829,11 +5851,15 @@ ase_char_t* ase_awk_format ( run->sprintf.tmp, ase_countof(run->sprintf.tmp), ASE_AWK_STR_BUF(fbu), - #ifdef _WIN32 - (__int64)l); - #else + #if ASE_SIZEOF_LONG_LONG > 0 (long long)l); - #endif + #elif ASE_SIZEOF___INT64 > 0 + (__int64)l); + #elif ASE_SIZEOF_LONG > 0 + (long)l); + #elif ASE_SIZEOF_INT > 0 + (int)l); + #endif p = run->sprintf.tmp; while (*p != ASE_T('\0')) diff --git a/ase/conf_msw.h b/ase/conf_msw.h index 1c3ba6aa..05ede6d8 100644 --- a/ase/conf_msw.h +++ b/ase/conf_msw.h @@ -1,5 +1,5 @@ /* - * $Id: conf_msw.h,v 1.5 2006-10-24 04:30:13 bacon Exp $ + * $Id: conf_msw.h,v 1.6 2006-11-19 06:15:57 bacon Exp $ */ /* @@ -29,14 +29,26 @@ _M_X64 x64 platform #define ASE_SIZEOF_LONG 4 #endif -#define ASE_SIZEOF_LONG_LONG 0 +#ifdef __POCC__ + /* pelles c with no microsoft extension */ + #define ASE_SIZEOF_LONG_LONG 8 -#define ASE_SIZEOF___INT8 1 -#define ASE_SIZEOF___INT16 2 -#define ASE_SIZEOF___INT32 4 -#define ASE_SIZEOF___INT64 8 -#define ASE_SIZEOF___INT96 0 -#define ASE_SIZEOF___INT128 0 + #define ASE_SIZEOF___INT8 0 + #define ASE_SIZEOF___INT16 0 + #define ASE_SIZEOF___INT32 0 + #define ASE_SIZEOF___INT64 0 + #define ASE_SIZEOF___INT96 0 + #define ASE_SIZEOF___INT128 0 +#else + #define ASE_SIZEOF_LONG_LONG 0 + + #define ASE_SIZEOF___INT8 1 + #define ASE_SIZEOF___INT16 2 + #define ASE_SIZEOF___INT32 4 + #define ASE_SIZEOF___INT64 8 + #define ASE_SIZEOF___INT96 0 + #define ASE_SIZEOF___INT128 0 +#endif #ifdef _WIN64 #define ASE_SIZEOF_VOID_P 8 diff --git a/ase/test/awk/makefile.bcc b/ase/test/awk/makefile.bcc index 8b522caf..80a9d135 100644 --- a/ase/test/awk/makefile.bcc +++ b/ase/test/awk/makefile.bcc @@ -17,7 +17,7 @@ STARTUP = c0x32w.obj all: awk awk: awk.obj - $(LD) $(LDFLAGS) $(STARTUP) awk.obj,awk.exe,,$(LIBS),, + $(LD) $(LDFLAGS) $(STARTUP) awk.obj,$@.exe,,$(LIBS),, clean: del $(OBJS) *.obj $(OUT) diff --git a/ase/test/awk/makefile.cl b/ase/test/awk/makefile.cl index 140db30d..6c97c329 100644 --- a/ase/test/awk/makefile.cl +++ b/ase/test/awk/makefile.cl @@ -6,7 +6,7 @@ LIBS = aseawk.lib kernel32.lib user32.lib all: awk #rex2 rex3 awk: awk.obj - link /nologo /out:awk.exe $(LDFLAGS) $(LIBS) awk.obj + link /nologo /out:$@.exe $(LDFLAGS) $(LIBS) awk.obj rex: rex.obj link /nologo /out:rex.exe $(LDFLAGS) $(LIBS) rex.obj