| 1 |
/***************************************************************************** |
| 2 |
** FILE IDENTIFICATION |
| 3 |
** |
| 4 |
** Name: msvc_compat.h |
| 5 |
** Purpose: Microsoft Visual C compatibility header |
| 6 |
** Author: Kevin Rosenberg |
| 7 |
** Date Started: Dec 2000 |
| 8 |
** |
| 9 |
** This is part of the CTSim program |
| 10 |
** Copyright (c) 1983-2009 Kevin Rosenberg |
| 11 |
** |
| 12 |
** This program is free software; you can redistribute it and/or modify |
| 13 |
** it under the terms of the GNU General Public License (version 2) as |
| 14 |
** published by the Free Software Foundation. |
| 15 |
** |
| 16 |
** This program is distributed in the hope that it will be useful, |
| 17 |
** but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 |
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 |
** GNU General Public License for more details. |
| 20 |
** |
| 21 |
** You should have received a copy of the GNU General Public License |
| 22 |
** along with this program; if not, write to the Free Software |
| 23 |
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 24 |
******************************************************************************/ |
| 25 |
|
| 26 |
#ifndef __MSVC_COMPAT_H |
| 27 |
#define __MSVC_COMPAT_H |
| 28 |
|
| 29 |
#ifdef MSVC |
| 30 |
typedef long off_t; |
| 31 |
#define HAVE_STRING_H 1 |
| 32 |
#define HAVE_VSNPRINTF 1 |
| 33 |
#include <fcntl.h> |
| 34 |
#define strdup _strdup |
| 35 |
#define strcasecmp _stricmp |
| 36 |
#define strncasecmp _strnicmp |
| 37 |
#define snprintf _snprintf |
| 38 |
#define vsnprintf _vsnprintf |
| 39 |
#pragma warning(disable:4786) |
| 40 |
#endif |
| 41 |
#endif |