aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-10-11 11:27:18 +0000
committerEugene Sandulenko2005-10-11 11:27:18 +0000
commit049dd317d70e89843df12e2d1d859ea850c600ae (patch)
treec0715f2c63f2c890fcfb641eae236e812b0cfab0
parentd63c8c0aee62cc66f36e73420aa6e5685a019cbd (diff)
downloadscummvm-rg350-049dd317d70e89843df12e2d1d859ea850c600ae.tar.gz
scummvm-rg350-049dd317d70e89843df12e2d1d859ea850c600ae.tar.bz2
scummvm-rg350-049dd317d70e89843df12e2d1d859ea850c600ae.zip
Patch #1323715 "OS/2 Patches to ScummVM" and credited the author.
svn-id: r19016
-rw-r--r--AUTHORS1
-rw-r--r--NEWS1
-rw-r--r--common/util.h5
-rwxr-xr-xconfigure56
-rw-r--r--doc/10.tex1
-rw-r--r--gui/credits.h2
-rwxr-xr-xtools/credits.pl1
7 files changed, 57 insertions, 10 deletions
diff --git a/AUTHORS b/AUTHORS
index 51625a3f95..1fb15c0e8e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -56,6 +56,7 @@ Contributors:
Daniel Schepler - Final MI1 CD music support, initial Ogg Vorbis
support
Johannes Schickel - Thumbnails for ScummEngine
+ Paul Smedley - OS/2 fixes
Andre Souza - SDL-based OpenGL renderer
Tim ??? - Initial MI1 CD music support
diff --git a/NEWS b/NEWS
index f35a6d37aa..7fef2d7d3a 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ For a more comprehensive changelog for the latest experimental CVS code, see:
- Added PlayStation Portable (PSP) port.
- Added AmigaOS 4 port.
- Added EPOC/SymbianOS port.
+ - Added fixes for OS/2 port.
General:
- Reworked cursor handling in SDL backend. Now cursors can have their own
diff --git a/common/util.h b/common/util.h
index 7f8c810fcf..98ba7cd95a 100644
--- a/common/util.h
+++ b/common/util.h
@@ -23,6 +23,11 @@
#include "common/scummsys.h"
+#if defined (__INNOTEK_LIBC__)
+#undef MIN
+#undef MAX
+#endif
+
template<typename T> inline T ABS (T x) { return (x>=0) ? x : -x; }
#if !defined(MIN)
template<typename T> inline T MIN (T a, T b) { return (a<b) ? a : b; }
diff --git a/configure b/configure
index d6032f8426..82d775ee4b 100755
--- a/configure
+++ b/configure
@@ -13,6 +13,27 @@
# use environment vars if set
CXXFLAGS="$CXXFLAGS $CPPFLAGS"
+# Backslashes into forward slashes:
+# The following OS/2 specific code is performed to deal with handling of backslashes by ksh.
+# Borrowed from the Sane configure script
+
+if test "$ac_emxsupport" != "no" -a "$ac_emxsupport" != "NO"; then
+ ac_save_IFS="$IFS"
+ IFS="\\"
+ ac_TEMP_PATH=
+ for ac_dir in $PATH; do
+ IFS=$ac_save_IFS
+ if test -z "$ac_TEMP_PATH"; then
+ ac_TEMP_PATH="$ac_dir"
+ else
+ ac_TEMP_PATH="$ac_TEMP_PATH/$ac_dir"
+ fi
+ done
+ export PATH="$ac_TEMP_PATH"
+ unset ac_TEMP_PATH
+fi
+
+
# default lib behaviour yes/no/auto
_vorbis=auto
_tremor=auto
@@ -81,9 +102,9 @@ cc_check() {
echo >> "$TMPLOG"
cat "$TMPC" >> "$TMPLOG"
echo >> "$TMPLOG"
- echo "$CXX $TMPC -o $TMPO $@" >> "$TMPLOG"
+ echo "$CXX $TMPC -o $TMPO$EXEEXT $@" >> "$TMPLOG"
rm -f "$TMPO$EXEEXT"
- ( $CXX "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
+ ( $CXX "$TMPC" -o "$TMPO$EXEEXT" "$@" ) >> "$TMPLOG" 2>&1
TMP="$?"
echo >> "$TMPLOG"
return "$TMP"
@@ -112,9 +133,9 @@ EOF
if test -n "$_host"; then
# In cross-compiling mode, we cannot run the result
- eval "$1 -o tmp_cxx_compiler tmp_cxx_compiler.cpp 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
+ eval "$1 -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
else
- eval "$1 -o tmp_cxx_compiler tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
+ eval "$1 -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
fi
}
@@ -124,12 +145,12 @@ fi
# TODO: small bit of code to test sdl useability
find_sdlconfig()
{
+
echo_n "Looking for sdl-config... "
sdlconfigs="$_sdlconfig:sdl-config:sdl11-config:sdl12-config"
_sdlconfig=
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR"
for path_dir in $_sdlpath; do
for sdlconfig in $sdlconfigs; do
if test -x "$path_dir/$sdlconfig" ; then
@@ -182,7 +203,7 @@ int main(int argc, char **argv)
return 0;
}
EOF
-if eval "$CXX -o tmp_find_type_with_size tmp_find_type_with_size.cpp"; then
+if eval "$CXX -o tmp_find_type_with_size$EXEEXT tmp_find_type_with_size.cpp"; then
datatype=`./tmp_find_type_with_size $1`
if test "$datatype" = "unknown"; then
echo "couldn't find data type with $1 bytes"
@@ -201,7 +222,7 @@ CheckNASM()
return;
fi
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$SEPARATOR
for path_dir in $_nasmpath; do
if test -x "$path_dir/nasm" ; then
@@ -470,7 +491,7 @@ esac
# Determine extension used for executables
#
case $_host_os in
-mingw* | cygwin*)
+mingw* | cygwin* | os2-emx*)
EXEEXT=".exe"
;;
arm-riscos)
@@ -482,6 +503,18 @@ arm-riscos)
esac
#
+# Determine separator used for $PATH
+#
+case $_host_os in
+os2-emx* )
+ SEPARATOR=";"
+ ;;
+* )
+ SEPARATOR=":"
+ ;;
+esac
+
+#
# Determine the C++ compiler
#
echo_n "Looking for C++ compiler... "
@@ -703,6 +736,9 @@ else
LIBS="$LIBS -mno-cygwin -lmingw32 -lwinmm"
OBJS="$OBJS scummvmico.o"
;;
+ os2-emx*)
+ DEFINES="$DEFINES -DUNIX"
+ ;;
# given this is a shell script assume some type of unix
*)
echo "WARNING: could not establish system type, assuming unix like"
@@ -730,7 +766,7 @@ int main(int argc, char **argv)
return 0;
}
EOF
- $CXX -o tmp_endianness_check tmp_endianness_check.cpp
+ $CXX -o tmp_endianness_check$EXEEXT tmp_endianness_check.cpp
endianness=`./tmp_endianness_check`
echo $endianness;
case $endianness in
diff --git a/doc/10.tex b/doc/10.tex
index e06cad4dd6..0d099ecb58 100644
--- a/doc/10.tex
+++ b/doc/10.tex
@@ -58,6 +58,7 @@
Edward Rudd & Fixes for playing MP3 versions of MI1/Loom audio\\
Daniel Schepler & Final MI1 CD music support, initial Ogg Vorbis support\\
Johannes Schickel & Thumbnails for ScummEngine\\
+ Paul Smedley & OS/2 fixes\\
Andr\'e Souza & SDL-based OpenGL renderer\\
Tim ??? & Initial MI1 CD music support\\
\end{tabular}
diff --git a/gui/credits.h b/gui/credits.h
index a4616d161d..f0d61c6fe6 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -107,6 +107,8 @@ static const char *credits[] = {
"\\L\\c2"" Vorbis support",
"\\L\\c0"" Johannes Schickel",
"\\L\\c2"" Thumbnails for ScummEngine",
+"\\L\\c0"" Paul Smedley",
+"\\L\\c2"" OS/2 fixes",
"\\L\\c0"" Andre Souza",
"\\L\\c2"" SDL-based OpenGL renderer",
"\\L\\c0"" Tim ???",
diff --git a/tools/credits.pl b/tools/credits.pl
index 689ab5402b..8f67b52a47 100755
--- a/tools/credits.pl
+++ b/tools/credits.pl
@@ -375,6 +375,7 @@ begin_credits("Credits");
add_person("Edward Rudd", "", "Fixes for playing MP3 versions of MI1/Loom audio");
add_person("Daniel Schepler", "", "Final MI1 CD music support, initial Ogg Vorbis support");
add_person("Johannes Schickel", "LordHoto", "Thumbnails for ScummEngine");
+ add_person("Paul Smedley", "Creeping", "OS/2 fixes");
add_person("Andr&eacute; Souza", "", "SDL-based OpenGL renderer");
add_person("Tim ???", "realmz", "Initial MI1 CD music support");
end_section();