Fixed tinyexif in Linux. Now to fix it in Windows.

This commit is contained in:
Stephen Anthony 2022-08-17 07:48:27 -02:30
parent f9a1782886
commit 13d933c429
7 changed files with 59 additions and 5 deletions

4
configure vendored
View File

@ -808,6 +808,7 @@ YACC="$SRC/yacc"
CHEAT="$SRC/cheat"
LIBPNG="$SRC/libpng"
LIBJPG="$SRC/nanojpeg"
LIBJPGEXIF="$SRC/tinyexif"
ZLIB="$SRC/zlib"
SQLITE_REPO="$SRC/common/repository/sqlite"
SQLITE_LIB="$SRC/sqlite"
@ -895,7 +896,8 @@ fi
if test "$_build_png" = yes ; then
DEFINES="$DEFINES -DIMAGE_SUPPORT"
INCLUDES="$INCLUDES -I$LIBJPG"
INCLUDES="$INCLUDES -I$LIBJPG -I$LIBJPGEXIF"
MODULES="$MODULES $LIBJPGEXIF"
if test "$_libpng" = yes ; then
LIBS="$LIBS `pkg-config --libs libpng`"
else

10
src/tinyexif/module.mk Normal file
View File

@ -0,0 +1,10 @@
MODULE := src/tinyexif
MODULE_OBJS := \
src/tinyexif/tinyexif.o
MODULE_DIRS += \
src/tinyexif
# Include common rules
include $(srcdir)/common.rules

42
src/tinyexif/tinyexif.cxx Normal file
View File

@ -0,0 +1,42 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2022 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================
/*
* We can't control the quality of code from outside projects, so for now
* just disable warnings for it.
*/
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Weverything"
#include "source/TinyEXIF.cpp"
#pragma clang diagnostic pop
#elif defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wcast-function-type"
#pragma GCC diagnostic ignored "-Wshift-negative-value"
#pragma GCC diagnostic ignored "-Wregister"
#include "source/TinyEXIF.cpp"
#pragma GCC diagnostic pop
#elif defined(BSPF_WINDOWS)
#pragma warning(push, 0)
#pragma warning(disable : 4505)
#include "source/TinyEXIF.cpp"
#pragma warning(pop)
#else
#include "source/TinyEXIF.cpp"
#endif

View File

@ -25,7 +25,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Weverything"
#include "tinyexif.h"
#include "source/TinyEXIF.h"
#pragma clang diagnostic pop
#elif defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic push
@ -33,15 +33,15 @@
#pragma GCC diagnostic ignored "-Wcast-function-type"
#pragma GCC diagnostic ignored "-Wshift-negative-value"
#pragma GCC diagnostic ignored "-Wregister"
#include "tinyexif.h"
#include "source/TinyEXIF.h"
#pragma GCC diagnostic pop
#elif defined(BSPF_WINDOWS)
#pragma warning(push, 0)
#pragma warning(disable : 4505)
#include "tinyexif.h"
#include "source/TinyEXIF.h"
#pragma warning(pop)
#else
#include "tinyexif.h"
#include "source/TinyEXIF.h"
#endif
#endif // TINYEXIF_LIB_HXX