diff options
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/hyper/ex2ht.c | 2 | ||||
-rw-r--r-- | src/include/open-axiom.h | 6 | ||||
-rw-r--r-- | src/include/sockio.h | 4 | ||||
-rw-r--r-- | src/lib/cfuns-c.c | 22 |
5 files changed, 25 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 68e95811..486073d8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2008-10-19 Alfredo Portes <doyenatccny@gmail.com> + + * include/open-axiom.h: Replace __MINGW32__ declaration + with __WIN32__. + * include/sockio.h: Likewise. + * hyper/ex2ht.c: Likewise. + * lib/cfuns-c.c: Likewise. + 2008-10-18 Gabriel Dos Reis <gdr@cs.tamu.edu> * hyper/Makefile.in (openaxiom_host_has_regex): Define. diff --git a/src/hyper/ex2ht.c b/src/hyper/ex2ht.c index b88d42ec..b59e505e 100644 --- a/src/hyper/ex2ht.c +++ b/src/hyper/ex2ht.c @@ -87,7 +87,7 @@ static void closeCoverFile(void) { fclose(coverFile); -#ifndef __MINGW32__ /* FIXME! */ +#ifndef __WIN32__ /* FIXME! */ utimes("coverex.ht",latest_date); #endif } diff --git a/src/include/open-axiom.h b/src/include/open-axiom.h index cae21d08..4ecfd16b 100644 --- a/src/include/open-axiom.h +++ b/src/include/open-axiom.h @@ -37,13 +37,13 @@ #include "openaxiom-c-macros.h" /* Cope with MS-platform oddities. */ -#ifdef __MINGW32__ +#ifdef __WIN32__ # ifdef DLL_EXPORT # define OPENAXIOM_EXPORT __declspec(dllexport) # elif defined(OPENAXIOM_DLL_IMPORT) # define OPENAXIOM_EXPORT __declspec(dllimport) # endif /* DLL_EXPORT */ -#endif /* __MINGW32__ */ +#endif /* __WIN32__ */ #ifndef OPENAXIOM_EXPORT # define OPENAXIOM_EXPORT /* nothing */ #endif /* OPENAXIOM_EXPORT */ @@ -56,7 +56,7 @@ typedef uint8_t openaxiom_byte; /* The opaque datatype. */ -#ifdef __MINGW32__ +#ifdef __WIN32__ #include <windows.h> typedef HANDLE openaxiom_handle; #else diff --git a/src/include/sockio.h b/src/include/sockio.h index 1a4e1253..88e8caaa 100644 --- a/src/include/sockio.h +++ b/src/include/sockio.h @@ -38,7 +38,7 @@ #include <stddef.h> -#ifdef __MINGW32__ +#ifdef __WIN32__ # include <winsock2.h> # define OPENAXIOM_INVALID_SOCKET INVALID_SOCKET #else @@ -59,7 +59,7 @@ Consequently, we abstract over that variation, using the typedef axiom_socket. */ -#ifdef __MINGW32__ +#ifdef __WIN32__ typedef SOCKET openaxiom_socket; typedef HANDLE openaxiom_filedesc; #else diff --git a/src/lib/cfuns-c.c b/src/lib/cfuns-c.c index fc2a7e14..8c7f4496 100644 --- a/src/lib/cfuns-c.c +++ b/src/lib/cfuns-c.c @@ -355,11 +355,11 @@ std_stream_is_terminal(int fd) OPENAXIOM_EXPORT int oa_chdir(const char* path) { -#ifdef __MINGW32__ +#ifdef __WIN32__ return SetCurrentDirectory(path) ? 0 : -1; #else return chdir(path); -#endif /* __MINGW32__ */ +#endif /* __WIN32__ */ } @@ -380,7 +380,7 @@ oa_unlink(const char* path) { const char* curdir; int status = -1; -#ifdef __MINGW32__ +#ifdef __WIN32__ WIN32_FIND_DATA findData; HANDLE walkHandle; @@ -464,7 +464,7 @@ oa_unlink(const char* path) status = -1; else status = 0; -#endif /* __MINGW32__ */ +#endif /* __WIN32__ */ sortie: oa_chdir(curdir); @@ -476,7 +476,7 @@ oa_unlink(const char* path) OPENAXIOM_EXPORT int oa_rename(const char* old_path, const char* new_path) { -#ifdef __MINGW32__ +#ifdef __WIN32__ return MoveFile(old_path, new_path) ? 0 : -1; #else return rename(old_path, new_path); @@ -488,7 +488,7 @@ oa_rename(const char* old_path, const char* new_path) OPENAXIOM_EXPORT int oa_mkdir(const char* path) { -#ifdef __MINGW32__ +#ifdef __WIN32__ return CreateDirectory(path, NULL) ? 0 : -1; #else # define DIRECTORY_PERM ((S_IRWXU|S_IRWXG|S_IRWXO) & ~(S_IWGRP|S_IWOTH)) @@ -510,7 +510,7 @@ oa_system(const char* cmd) OPENAXIOM_EXPORT char* oa_getenv(const char* var) { -#ifdef __MINGW32__ +#ifdef __WIN32__ #define BUFSIZE 128 char* buf = (char*) malloc(BUFSIZE); int len = GetEnvironmentVariable(var, buf, BUFSIZE); @@ -538,7 +538,7 @@ oa_getcwd(void) { int bufsz = 256; char* buf = (char*) malloc(bufsz); -#ifdef __MINGW32__ +#ifdef __WIN32__ int n = GetCurrentDirectory(bufsz, buf); if (n == 0) { perror("oa_getcwd"); @@ -552,7 +552,7 @@ oa_getcwd(void) } } return buf; -#else /* __MINGW32__ */ +#else /* __WIN32__ */ errno = 0; while (getcwd(buf,bufsz) == 0) { if (errno == ERANGE) { @@ -572,7 +572,7 @@ oa_getcwd(void) OPENAXIOM_EXPORT int oa_access_file_for_read(const char* path) { -#ifdef __MINGW32__ +#ifdef __WIN32__ return GetFileAttributes(path) == INVALID_FILE_ATTRIBUTES ? -1 : 1; #else return access(path, R_OK); @@ -583,7 +583,7 @@ oa_access_file_for_read(const char* path) OPENAXIOM_EXPORT const char* oa_get_tmpdir(void) { -#ifdef __MINGW32__ +#ifdef __WIN32__ char* buf; /* First, probe. */ int bufsz = GetTempPath(0, NULL); |