dosbox-wii/include/cross.h

70 lines
1.8 KiB
C
Raw Normal View History

2009-05-02 23:03:37 +02:00
/*
2009-05-03 00:28:34 +02:00
* Copyright (C) 2002-2007 The DOSBox Team
2009-05-02 23:03:37 +02:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2009-05-03 00:02:15 +02:00
* GNU General Public License for more details.
2009-05-02 23:03:37 +02:00
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
2009-05-03 00:28:34 +02:00
/* $Id: cross.h,v 1.18 2007/01/08 19:45:37 qbix79 Exp $ */
2009-05-02 23:53:27 +02:00
2009-05-03 00:18:08 +02:00
#ifndef DOSBOX_CROSS_H
#define DOSBOX_CROSS_H
2009-05-02 23:03:37 +02:00
2009-05-03 00:28:34 +02:00
#ifndef DOSBOX_DOSBOX_H
#include "dosbox.h"
#endif
2009-05-02 23:03:37 +02:00
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#if defined (_MSC_VER) /* MS Visual C++ */
#include <direct.h>
#include <io.h>
2009-05-02 23:43:00 +02:00
#define LONGTYPE(a) a##i64
2009-05-03 00:02:15 +02:00
#define snprintf _snprintf
#define vsnprintf _vsnprintf
2009-05-02 23:43:00 +02:00
#else /* LINUX / GCC */
2009-05-02 23:03:37 +02:00
#include <dirent.h>
#include <unistd.h>
2009-05-02 23:43:00 +02:00
#define LONGTYPE(a) a##LL
2009-05-02 23:03:37 +02:00
#endif
#define CROSS_LEN 512 /* Maximum filename size */
2009-05-03 00:18:08 +02:00
#if defined (WIN32) || defined (OS2) /* Win 32 & OS/2*/
2009-05-03 00:02:15 +02:00
#define CROSS_FILENAME(blah)
2009-05-02 23:03:37 +02:00
#define CROSS_FILESPLIT '\\'
#define F_OK 0
#else
#define CROSS_FILENAME(blah) strreplace(blah,'\\','/')
#define CROSS_FILESPLIT '/'
#endif
#define CROSS_NONE 0
#define CROSS_FILE 1
#define CROSS_DIR 2
2009-05-02 23:20:05 +02:00
#if defined (WIN32)
2009-05-02 23:12:18 +02:00
#define ftruncate(blah,blah2) chsize(blah,blah2)
#endif
2009-05-02 23:03:37 +02:00
2009-05-03 00:28:34 +02:00
//Solaris maybe others
#if defined (DB_HAVE_NO_POWF)
#include <math.h>
static inline float powf (float x, float y) { return (float) pow (x,y); }
#endif
2009-05-02 23:03:37 +02:00
#endif