diff --git a/apu/bapu/dsp/blargg_config.h b/apu/bapu/dsp/blargg_config.h index a99d69f7..ba51d8f7 100644 --- a/apu/bapu/dsp/blargg_config.h +++ b/apu/bapu/dsp/blargg_config.h @@ -10,7 +10,9 @@ #endif // Uncomment to enable platform-specific (and possibly non-portable) optimizations +#if !defined(__CELLOS_LV2__) #define BLARGG_NONPORTABLE 1 +#endif // Uncomment if automatic byte-order determination doesn't work //#define BLARGG_BIG_ENDIAN 1 diff --git a/libretro/Makefile b/libretro/Makefile index e49c8597..c86b0e3c 100644 --- a/libretro/Makefile +++ b/libretro/Makefile @@ -1,6 +1,7 @@ DEBUG = 0 HAVE_EXCEPTIONS = 0 LAGFIX=1 +HAVE_STRINGS_H = 1 SPACE := SPACE := $(SPACE) $(SPACE) @@ -167,6 +168,7 @@ else ifneq (,$(filter $(platform), ps3 sncps3 psl1ght)) TARGET := $(TARGET_NAME)_libretro_$(platform).a CXXFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__ STATIC_LINKING = 1 + HAVE_STRINGS_H = 0 # sncps3 ifneq (,$(findstring sncps3,$(platform))) @@ -517,9 +519,12 @@ endif CXXFLAGS += $(CODE_DEFINES) $(WARNINGS_DEFINES) $(fpic) CXXFLAGS += -DRIGHTSHIFT_IS_SAR -D__LIBRETRO__ -DALLOW_CPU_OVERCLOCK CFLAGS = $(CXXFLAGS) - +CFLAGS += -DHAVE_STDINT_H +CXXFLAGS += -DHAVE_STDINT_H ifeq (,$(findstring msvc,$(platform))) +ifeq ($(HAVE_STRINGS_H), 1) CXXFLAGS += -DHAVE_STRINGS_H +endif CXXFLAGS += -fno-rtti -pedantic ifneq ($(HAVE_EXCEPTIONS), 1) CXXFLAGS += -fno-exceptions diff --git a/sha256.cpp b/sha256.cpp index d46010d6..22691d7a 100644 --- a/sha256.cpp +++ b/sha256.cpp @@ -13,8 +13,9 @@ *********************************************************************/ /*************************** HEADER FILES ***************************/ +#include #include -#include +#include /****************************** MACROS ******************************/ #define ROTLEFT(a,b) (((a) << (b)) | ((a) >> (32-(b)))) @@ -35,7 +36,7 @@ typedef unsigned int WORD; /* 32-bit word, change to "long" for 16- typedef struct { BYTE data[64]; WORD datalen; - unsigned long long bitlen; + uint64_t bitlen; WORD state[8]; } SHA256_CTX;