From 29e6dde0bd8e8d87e678b89c4bc2a49a2978d407 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Wed, 25 Sep 2002 20:08:33 +0000 Subject: [PATCH] Works on FreeBSD now. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@82 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/configure.ac | 11 +++++++++-- sc2/content/defgrp.dat | Bin 288 -> 288 bytes sc2/content/randgrp.dat | Bin 287 -> 287 bytes sc2/src/sc2code/libs/resource/direct.c | 3 ++- sc2/src/sc2code/libs/threads/sdl/sdlthreads.c | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sc2/configure.ac b/sc2/configure.ac index 50d7f386f..34ce03b2a 100644 --- a/sc2/configure.ac +++ b/sc2/configure.ac @@ -73,8 +73,8 @@ AM_PATH_SMPEG($SMPEG_VERSION, , AC_MSG_ERROR([*** smpeg version $SMPEG_VERSION n AC_CHECK_LIB(SDL_mixer, main, , AC_MSG_ERROR([Your system is missing libSDL_mixer!]),`sdl-config --libs`) AC_CHECK_LIB(SDL_image, main, , AC_MSG_ERROR([Your system is missing libSDL_image!]),`sdl-config --libs`) AC_CHECK_LIB(smpeg, main, , AC_MSG_ERROR([Your system is missing libsmpeg!]),`smpeg-config --libs`) -AC_CHECK_HEADERS(SDL/SDL_image.h, , AC_MSG_ERROR([Your system is missing SDL_image.h!])) -AC_CHECK_HEADERS(SDL/SDL_mixer.h, , AC_MSG_ERROR([Your system is missing SDL_mixer.h!])) +#AC_CHECK_HEADERS(SDL/SDL_image.h, , AC_MSG_ERROR([Your system is missing SDL_image.h!])) +#AC_CHECK_HEADERS(SDL/SDL_mixer.h, , AC_MSG_ERROR([Your system is missing SDL_mixer.h!])) # Select platform dependent OpenGL libs.. (tweak your platform here) case "$target" in @@ -91,6 +91,13 @@ case "$target" in *-*-darwin*) SYS_GL_LIBS="" ;; + *-*-freebsd*) + AC_PATH_X + if test x$no_x != xyes; then + CFLAGS="$CFLAGS -L $x_libraries" + fi + SYS_GL_LIBS="-lGL" + ;; *) if test x$have_x = xyes; then CFLAGS="$CFLAGS $X_CFLAGS" diff --git a/sc2/content/defgrp.dat b/sc2/content/defgrp.dat index 00cb5c048ff5fc99d92aaf3e9211c76fa0bbcb26..44dbe3962028f81926fff0085d11c44a3291c9d0 100644 GIT binary patch literal 288 zcmZQzlwjfvV#wxT00Le{28IJRiW(QBtT<2dYifYlPd6xNFt{w{G&r?(zt~0vjUzz0 zPM|sjbiLZ~?_YYzGzwh5(@Ys;4X*2Y`GKo*2Z+;lZ#+?#bQMlpLU3 z0}wMn^{xT3Tf!{amjLNwH&{5B7#KL18kk!cGL~?HFi8HbC>zIwRtqp+18UD7WiAeo z+b;Ob2aAK$mN76fyaB4Wl!2&cH)fCkng<3Tw}BWur`PW1*I?yfkOOjndN_O``o$T= OAxgy=7#YDnWB>s2;Y!K? literal 288 zcmZQzlwe{AV#wxT00Le{AfW(aF)+M2pyR;sCw~8lukri6!lWH+Cg^e8u;pg}@g;%$ z70e6_FkH`H&#Wg5(f0x&`1?-v1L2_Wv;$HK9sTNjLX z@v?Gk0g8dlD!Md{17trt&?t~t2oQS!v06VX2h1)}epU{FiMkw2Ks6~qIn7xReuYFF zhXzpW&1)78aUd%h25Fv2}Mn(ou HU@!mxqfAB~ diff --git a/sc2/content/randgrp.dat b/sc2/content/randgrp.dat index d52344b861d9c0030226b230e562d707e46d7eba..0d5bda659b41df62d6470e646b2e5c629def1c41 100644 GIT binary patch literal 287 zcmZROVA>zVkj=rv$iM(Z3<;YJG~$3XkDZ~0M6;0wNNgFKt_Fy22xNnR6B7T;iM9I; zoD9J7Aocr@6+8bl~zbC)e%|3$l;3OGkqt zV+kh+`vB$Nin4J`Xte@J{wkRA?Si2hIpAfHhjqFkJrk&&5EiShb301Od7u>b%7 literal 287 zcmZROWO4{%$mZZ-WMEh^=_W_qLLG+#R=N%jlW%f>_@dh^9Dq__xhY@b_k;KiU*q@l zCNesJ_{N1g4go;5KqX)`r3DcEFg=;mbinFC@<)K`L41(eATvN}(tLCrF627H?P$}m zaQFgL2U0HrR0HA*Ow{FI0`ggae9c*`93Xy$L>z|(P^>S7nL!*#ODqosi-X(@G8cqR zfa*Kv0oAKBFo4v9uAgT)xdLDn!Zh$k>I8ZbItELQ~pwSZPW diff --git a/sc2/src/sc2code/libs/resource/direct.c b/sc2/src/sc2code/libs/resource/direct.c index 759cad036..9f4cdec29 100644 --- a/sc2/src/sc2code/libs/resource/direct.c +++ b/sc2/src/sc2code/libs/resource/direct.c @@ -145,6 +145,7 @@ LoadDirEntryTable (PSTR pattern, PCOUNT pnum_entries) #include #include #include +#include DIRENTRY_REF LoadDirEntryTable (PSTR pattern, PCOUNT pnum_entries) @@ -154,7 +155,7 @@ LoadDirEntryTable (PSTR pattern, PCOUNT pnum_entries) STRING_TABLEPTR lpST; PDWORD lpLastOffs; PSTR slash; // Pointer inside pattern to the last / - SBYTE path[PATH_MAX + 1]; // buffer for a filename with path + SBYTE path[MAXPATHLEN + 1]; // buffer for a filename with path PSTR file; // Pointer inside path to the filename size_t pathlen; // length of path, excluding last / and filename diff --git a/sc2/src/sc2code/libs/threads/sdl/sdlthreads.c b/sc2/src/sc2code/libs/threads/sdl/sdlthreads.c index 75b49b1c8..74ccb1f5d 100644 --- a/sc2/src/sc2code/libs/threads/sdl/sdlthreads.c +++ b/sc2/src/sc2code/libs/threads/sdl/sdlthreads.c @@ -20,8 +20,8 @@ #include "sdlthreads.h" #if defined(PROFILE_THREADS) && !defined(WIN32) -#include #include +#include #endif #ifdef PROFILE_THREADS