diff options
author | Karl Berry <karl@freefriends.org> | 2010-01-31 00:37:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-01-31 00:37:08 +0000 |
commit | fddb3638f20eff3f5c3a2f87103b8c1f330a637d (patch) | |
tree | 26e8107bf7dc9849f4727c8e5e2758106afe216d /Build/source/texk/kpathsea/win32lib.h | |
parent | b251a1a9ddd70c3703f12bb312787f0406f368cd (diff) |
reinstate win32lib.h and make other _WIN32-related changes, for compilation with MSVC 7.1; from Javier Mugica
git-svn-id: svn://tug.org/texlive/trunk@16876 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/win32lib.h')
-rw-r--r-- | Build/source/texk/kpathsea/win32lib.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Build/source/texk/kpathsea/win32lib.h b/Build/source/texk/kpathsea/win32lib.h new file mode 100644 index 00000000000..6c1e19cabee --- /dev/null +++ b/Build/source/texk/kpathsea/win32lib.h @@ -0,0 +1,52 @@ +/* This file is public domain. */ + +#ifndef _WIN32LIB_H_ +#define _WIN32LIB_H_ + +#if !__STDC__ +#if _MSC_VER>=1200 + #pragma warning(push) +#endif +#pragma warning(disable: 4668) +#pragma warning(disable: 4255) + +#define boolean donotuse_boolean +#include <windows.h> /* Somewhere here WIN32 gets defined */ +#undef boolean + +#if _MSC_VER>=1200 + #pragma warning(pop) +#else + #pragma warning(default: 4668) + #pragma warning(default: 4255) +#endif + +#else /*__STDC__*/ +/* non-ansi definitions for an ANSI compliation with /Fa */ +#define WIN32 +#define off_t _off_t +#define putenv _putenv +#define getcwd _getcwd +#define getcw _getcw +#define putenv _putenv +#define strdup _strdup +#define vsnprintf _vsnprintf +#define fileno _fileno +#define strlwr _strlwr +#define isascii __isascii +#define mkdir _mkdir +#define stat _stat +#define stricmp _stricmp +#define MAX_PATH _MAX_PATH +#define S_IFREG _S_IFREG +#define S_IFMT _S_IFMT + +#endif /*__STDC__*/ + +//This is not defined even if !__STDC__ +#define snprintf _snprintf + +//The gnu name is different +#define strcasecmp stricmp + +#endif |