mirror of https://github.com/stella-emu/stella.git
Now that we're using C++11 and cstdint is standard, we no longer need to
worry about inttypes.h and associated defines. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3085 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
61aa0bb4f4
commit
cf10f4c24f
|
@ -714,12 +714,12 @@ LIBS="$LIBS `$_sdlconfig $_sdl_conf_libs`"
|
||||||
LD=$CXX
|
LD=$CXX
|
||||||
case $_host_os in
|
case $_host_os in
|
||||||
unix)
|
unix)
|
||||||
DEFINES="$DEFINES -DBSPF_UNIX -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES"
|
DEFINES="$DEFINES -DBSPF_UNIX -DHAVE_GETTIMEOFDAY"
|
||||||
MODULES="$MODULES $SRC/unix"
|
MODULES="$MODULES $SRC/unix"
|
||||||
INCLUDES="$INCLUDES -I$SRC/unix"
|
INCLUDES="$INCLUDES -I$SRC/unix"
|
||||||
;;
|
;;
|
||||||
win32)
|
win32)
|
||||||
DEFINES="$DEFINES -DBSPF_WINDOWS -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES"
|
DEFINES="$DEFINES -DBSPF_WINDOWS -DHAVE_GETTIMEOFDAY"
|
||||||
MODULES="$MODULES $SRC/windows"
|
MODULES="$MODULES $SRC/windows"
|
||||||
INCLUDES="$INCLUDES -I$SRC/windows"
|
INCLUDES="$INCLUDES -I$SRC/windows"
|
||||||
LIBS="$LIBS -lmingw32 -lwinmm"
|
LIBS="$LIBS -lmingw32 -lwinmm"
|
||||||
|
|
|
@ -28,9 +28,7 @@
|
||||||
@version $Id$
|
@version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_INTTYPES
|
#include <cstdint>
|
||||||
#include <inttypes.h>
|
|
||||||
|
|
||||||
// Types for 8-bit signed and unsigned integers
|
// Types for 8-bit signed and unsigned integers
|
||||||
typedef int8_t Int8;
|
typedef int8_t Int8;
|
||||||
typedef uint8_t uInt8;
|
typedef uint8_t uInt8;
|
||||||
|
@ -43,23 +41,6 @@
|
||||||
// Types for 64-bit signed and unsigned integers
|
// Types for 64-bit signed and unsigned integers
|
||||||
typedef int64_t Int64;
|
typedef int64_t Int64;
|
||||||
typedef uint64_t uInt64;
|
typedef uint64_t uInt64;
|
||||||
#elif defined BSPF_WINDOWS
|
|
||||||
// Types for 8-bit signed and unsigned integers
|
|
||||||
typedef signed char Int8;
|
|
||||||
typedef unsigned char uInt8;
|
|
||||||
// Types for 16-bit signed and unsigned integers
|
|
||||||
typedef signed short Int16;
|
|
||||||
typedef unsigned short uInt16;
|
|
||||||
// Types for 32-bit signed and unsigned integers
|
|
||||||
typedef signed int Int32;
|
|
||||||
typedef unsigned int uInt32;
|
|
||||||
// Types for 64-bit signed and unsigned integers
|
|
||||||
typedef __int64 Int64;
|
|
||||||
typedef unsigned __int64 uInt64;
|
|
||||||
#else
|
|
||||||
#error Update src/common/bspf.hxx for datatypes
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// The following code should provide access to the standard C++ objects and
|
// The following code should provide access to the standard C++ objects and
|
||||||
// types: cout, cerr, string, ostream, istream, etc.
|
// types: cout, cerr, string, ostream, istream, etc.
|
||||||
|
@ -183,7 +164,7 @@ inline size_t BSPF_findIgnoreCase(const string& s1, const string& s2, int startp
|
||||||
{
|
{
|
||||||
auto pos = std::search(s1.begin()+startpos, s1.end(),
|
auto pos = std::search(s1.begin()+startpos, s1.end(),
|
||||||
s2.begin(), s2.end(), [](char ch1, char ch2) {
|
s2.begin(), s2.end(), [](char ch1, char ch2) {
|
||||||
return toupper((unsigned char)ch1) == toupper((unsigned char)ch2);
|
return toupper((uInt8)ch1) == toupper((uInt8)ch2);
|
||||||
});
|
});
|
||||||
return pos == s1.end() ? string::npos : pos - (s1.begin()+startpos);
|
return pos == s1.end() ? string::npos : pos - (s1.begin()+startpos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,7 +270,7 @@ void MT24LC256::jpee_clock_fall()
|
||||||
{
|
{
|
||||||
if (!jpee_pptr)
|
if (!jpee_pptr)
|
||||||
{
|
{
|
||||||
jpee_packet[0] = (unsigned char)jpee_nb;
|
jpee_packet[0] = (uInt8)jpee_nb;
|
||||||
if (jpee_smallmode && ((jpee_nb & 0xF0) == 0xA0))
|
if (jpee_smallmode && ((jpee_nb & 0xF0) == 0xA0))
|
||||||
{
|
{
|
||||||
jpee_packet[1] = (jpee_nb >> 1) & 7;
|
jpee_packet[1] = (jpee_nb >> 1) & 7;
|
||||||
|
@ -312,7 +312,7 @@ void MT24LC256::jpee_clock_fall()
|
||||||
{
|
{
|
||||||
if (!jpee_pptr)
|
if (!jpee_pptr)
|
||||||
{
|
{
|
||||||
jpee_packet[0] = (unsigned char)jpee_nb;
|
jpee_packet[0] = (uInt8)jpee_nb;
|
||||||
if (jpee_smallmode)
|
if (jpee_smallmode)
|
||||||
jpee_pptr=2;
|
jpee_pptr=2;
|
||||||
else
|
else
|
||||||
|
@ -321,7 +321,7 @@ void MT24LC256::jpee_clock_fall()
|
||||||
else if (jpee_pptr < 70)
|
else if (jpee_pptr < 70)
|
||||||
{
|
{
|
||||||
JPEE_LOG1("I2C_SENT(%02X)",jpee_nb & 0xFF);
|
JPEE_LOG1("I2C_SENT(%02X)",jpee_nb & 0xFF);
|
||||||
jpee_packet[jpee_pptr++] = (unsigned char)jpee_nb;
|
jpee_packet[jpee_pptr++] = (uInt8)jpee_nb;
|
||||||
jpee_address = (jpee_packet[1] << 8) | jpee_packet[2];
|
jpee_address = (jpee_packet[1] << 8) | jpee_packet[2];
|
||||||
if (jpee_pptr > 2)
|
if (jpee_pptr > 2)
|
||||||
jpee_ad_known = 1;
|
jpee_ad_known = 1;
|
||||||
|
|
|
@ -398,7 +398,7 @@ bool LauncherDialog::matchPattern(const string& s, const string& pattern) const
|
||||||
const char* haystack = s.c_str();
|
const char* haystack = s.c_str();
|
||||||
const char* needle = pattern.c_str();
|
const char* needle = pattern.c_str();
|
||||||
|
|
||||||
unsigned char b = tolower((unsigned char) *needle);
|
uInt8 b = tolower((uInt8) *needle);
|
||||||
|
|
||||||
needle++;
|
needle++;
|
||||||
for (;; haystack++)
|
for (;; haystack++)
|
||||||
|
@ -407,7 +407,7 @@ bool LauncherDialog::matchPattern(const string& s, const string& pattern) const
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* The first character matches */
|
/* The first character matches */
|
||||||
if (tolower ((unsigned char) *haystack) == b)
|
if (tolower ((uInt8) *haystack) == b)
|
||||||
{
|
{
|
||||||
const char* rhaystack = haystack + 1;
|
const char* rhaystack = haystack + 1;
|
||||||
const char* rneedle = needle;
|
const char* rneedle = needle;
|
||||||
|
@ -420,8 +420,8 @@ bool LauncherDialog::matchPattern(const string& s, const string& pattern) const
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Nothing in this round */
|
/* Nothing in this round */
|
||||||
if (tolower ((unsigned char) *rhaystack)
|
if (tolower ((uInt8) *rhaystack)
|
||||||
!= tolower ((unsigned char) *rneedle))
|
!= tolower ((uInt8) *rneedle))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2325,7 +2325,6 @@
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
HAVE_INTTYPES,
|
|
||||||
HAVE_GETTIMEOFDAY,
|
HAVE_GETTIMEOFDAY,
|
||||||
CHEATCODE_SUPPORT,
|
CHEATCODE_SUPPORT,
|
||||||
DEBUGGER_SUPPORT,
|
DEBUGGER_SUPPORT,
|
||||||
|
@ -2377,7 +2376,6 @@
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||||
GCC_OPTIMIZATION_LEVEL = 3;
|
GCC_OPTIMIZATION_LEVEL = 3;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
HAVE_INTTYPES,
|
|
||||||
HAVE_GETTIMEOFDAY,
|
HAVE_GETTIMEOFDAY,
|
||||||
CHEATCODE_SUPPORT,
|
CHEATCODE_SUPPORT,
|
||||||
DEBUGGER_SUPPORT,
|
DEBUGGER_SUPPORT,
|
||||||
|
@ -2428,7 +2426,6 @@
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||||
GCC_OPTIMIZATION_LEVEL = 3;
|
GCC_OPTIMIZATION_LEVEL = 3;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
HAVE_INTTYPES,
|
|
||||||
HAVE_GETTIMEOFDAY,
|
HAVE_GETTIMEOFDAY,
|
||||||
CHEATCODE_SUPPORT,
|
CHEATCODE_SUPPORT,
|
||||||
DEBUGGER_SUPPORT,
|
DEBUGGER_SUPPORT,
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
#ifndef ZCONF_H
|
#ifndef ZCONF_H
|
||||||
#define ZCONF_H
|
#define ZCONF_H
|
||||||
|
|
||||||
/** Added by SA *********/
|
|
||||||
#ifdef HAVE_INTTYPES
|
|
||||||
#define Z_HAVE_UNISTD_H
|
|
||||||
#endif
|
|
||||||
#define ZLIB_CONST
|
#define ZLIB_CONST
|
||||||
/**************************/
|
/**************************/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue