+2009-10-15 Ivan Maidanski <ivmai@mail.ru>
+
+ * include/private/gcconfig.h: Recognize __i386__ if WinCE (for
+ x86mingw32ce toolchain).
+ * include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
+ toolchain (or if already defined).
+ * include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
+ defined for WinCE or if NO_GETENV is defined).
+ * misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
+ NO_GETENV one.
+
2009-10-15 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
* configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
# if defined(SH3) || defined(SH4)
# define SH
# endif
-# if defined(x86)
+# if defined(x86) || defined(__i386__)
# define I386
# endif
# if defined(_M_ARM) || defined(ARM) || defined(_ARM_)
# endif
# endif
-# if defined(MSWINCE)
+# if defined(MSWINCE) && !defined(__CEGCC__) && !defined(NO_GETENV)
# define NO_GETENV
# endif
+# if (defined(NO_GETENV) || defined(MSWINCE)) && !defined(NO_GETENV_WIN32)
+# define NO_GETENV_WIN32
+# endif
+
# ifndef STRTOULL
# if defined(_WIN64) && !defined(__GNUC__)
# define STRTOULL _strtoui64
STATIC HANDLE GC_CreateLogFile(void)
{
-# if !defined(NO_GETENV) || !defined(OLD_WIN32_LOG_FILE)
+# if !defined(NO_GETENV_WIN32) || !defined(OLD_WIN32_LOG_FILE)
TCHAR logPath[_MAX_PATH + 0x10]; /* buffer for path + ext */
# endif
/* Use GetEnvironmentVariable instead of GETENV() for unicode support. */
-# ifndef NO_GETENV
+# ifndef NO_GETENV_WIN32
if (GetEnvironmentVariable(TEXT("GC_LOG_FILE"), logPath,
- _MAX_PATH + 1) - 1U >= (DWORD)_MAX_PATH)
+ _MAX_PATH + 1) - 1U >= (DWORD)_MAX_PATH)
# endif
{
/* Env var not found or its value too long. */
memcpy(&logPath[len], TEXT(".gc.log"), sizeof(TEXT(".gc.log")));
# endif
}
-# if !defined(NO_GETENV) || !defined(OLD_WIN32_LOG_FILE)
+# if !defined(NO_GETENV_WIN32) || !defined(OLD_WIN32_LOG_FILE)
return CreateFile(logPath, GENERIC_WRITE, FILE_SHARE_READ,
NULL /* lpSecurityAttributes */, CREATE_ALWAYS,
GC_print_stats == VERBOSE ? FILE_ATTRIBUTE_NORMAL :