[SDL-CVS] Module SDL12: Change committed

Hello !

When trying to compile a fresh checkedout CVS version
from SDL with CYGWIN ( MinGW Mode ) i get the following error :

---------------->

/timer -I…/…/…/src/endian -I…/…/…/src/file -I…/…/…/src/thread
-MT SDL_d
x5events.lo -MD -MP -MF .deps/SDL_dx5events.Tpo -c SDL_dx5events.c
-DPIC -o .li
bs/SDL_dx5events.o
SDL_dx5events.c: In function DX5_DInputInit': SDL_dx5events.c:184: error: too many arguments to functionGetTopLevelParent’
SDL_dx5events.c: In function DX5_DInputReset': SDL_dx5events.c:668: error: too many arguments to functionGetTopLevelParent’
make[3]: *** [SDL_dx5events.lo] Error 1

<---------------

CU

Anonymous CVS Login schrieb:> Commiter : cvs

CVSROOT : /home/sdlweb/libsdl.org/cvs
Module : SDL12
Commit time: 2005-08-11 01:02:11 UTC

Log message:

Patches to make SDL compatible with Win95 again.

Modified files:
src/video/windx5/SDL_dx5events.c


Index: SDL12/src/video/windx5/SDL_dx5events.c
diff -u SDL12/src/video/windx5/SDL_dx5events.c:1.23 SDL12/src/video/windx5/SDL_dx5events.c:1.24
— SDL12/src/video/windx5/SDL_dx5events.c:1.23 Mon Nov 15 13:11:44 2004
+++ SDL12/src/video/windx5/SDL_dx5events.c Wed Aug 10 18:02:01 2005
@@ -22,7 +22,7 @@

#ifdef SAVE_RCSID
static char rcsid =

  • “@(#) $Id: SDL_dx5events.c,v 1.23 2004/11/15 21:11:44 slouken Exp $”;
  • “@(#) $Id: SDL_dx5events.c,v 1.24 2005/08/11 01:02:01 icculus Exp $”;
    #endif

/* CAUTION!!! If you modify this file, check …/windib/SDL_sysevents.c */
@@ -68,6 +68,19 @@
and give him a chance to handle some messages. */
static WNDPROC userWindowProc = NULL;

+static HWND GetTopLevelParent(HWND hWnd)
+{

  • HWND hParentWnd;
  • while (1)
  • {
  •    hParentWnd = GetParent(hWnd);
    
  •    if (hParentWnd == NULL)
    
  •        break;
    
  •    hWnd = hParentWnd;
    
  • }
  • return hWnd;
    +}

/* Convert a DirectInput return code to a text message */
static void SetDIerror(char *function, int code)
{
@@ -168,7 +181,7 @@
SetDIerror(“DirectInputDevice::QueryInterface”, result);
return(-1);
}

  • topwnd =  GetAncestor(SDL_Window, GA_ROOT);
    
  • topwnd =  GetTopLevelParent(SDL_Window, GA_ROOT);
    result = IDirectInputDevice2_SetCooperativeLevel(SDL_DIdev[i],
    			topwnd, inputs[i].win_level);
    if ( result != DI_OK ) {
    

@@ -652,7 +665,7 @@
level = inputs[i].win_level;
}
IDirectInputDevice2_Unacquire(SDL_DIdev[i]);

  • 	topwnd = GetAncestor(SDL_Window, GA_ROOT);
    
  • 	topwnd = GetTopLevelParent(SDL_Window, GA_ROOT);
    	result = IDirectInputDevice2_SetCooperativeLevel(
    			SDL_DIdev[i], topwnd, level);
    	IDirectInputDevice2_Acquire(SDL_DIdev[i]);
    


SDL-CVS mailing list
SDL-CVS at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl-cvs

When trying to compile a fresh checkedout CVS version
from SDL with CYGWIN ( MinGW Mode ) i get the following error :

Whoops, my fault. Latest in CVS should be good now.

–ryan.

Hello !

SDL_config.h will eventually be a general feature set test,
which will be useful for any program built with SDL on a given platform.

Please, and please add something like this to
the other libraries. For example SDL_image should
have something like #define SDL_IMAGE_PNG, so that
a programm can check whether the installed lib
is compiled with PNG support or not.

CU

  1. SDL_calloc is not defined in include/SDL_stdlib.h
    though it is used in src/thread/SDL_sysmutex.c.
    You should add the following in include/SDL_stdlib.h
    #ifdef HAVE_CALLOC
    #define SDL_calloc calloc
    #else
    extern DECLSPEC void * SDLCALL SDL_calloc(size_t nmemb, size_t size);
    #endif
    and add the following in include/SDL_config.h
    #define HAVE_CALLOC

  2. SDL_malloc , SDL_strlen and so on are used in
    src/audio/mme/SDL_mmeaudio.c without including SDL_stdlib.h and
    SDL_string.h.

I attach a patch to fix these problems.–
Hayashi Naoyuki <@Hayashi_Naoyuki>
Key fingerprint = 60A0 D5D3 F58B 3633 2E52 0147 D17F 5578 3FDF F5B6
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: SDL12-osf1.patch
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060207/c607337e/attachment.asc

Try now, I just fixed a bunch of build problems in CVS

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Hello !

Fixed building with cygwin

Great. That fixed it and it fixed also building with DirectX.
The only problem at the moment is building SDL C++ Apps.

Is there any possible way with a #define or some
magic to replace int main … with extern “C” int main ?

As this is only a CPP problem, there could be also
#ifdef _cplusplus
Only then replace int main with extern “C” int main
#endif

CU

Hello !

ranlib needs to be run after the library is installed…

libSDLmain.a needs also ranlib.

CU

Hello !

ranlib needs to be run after the library is installed…

libSDLmain.a needs also ranlib.

That’s what the CVS commit did. :slight_smile:

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Hello !

When compiling on Win32 CYGWIN ( MinGW Mode ) :

checking for nanosleep… no
checking for pow in -lm… yes
./configure: line 27826: syntax error near unexpected token then' ./configure: line 27826: if $PKG_CONFIG
–atleast-pkgconfig-ver
sion 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION
directfb ;
then then’

CU

<<

Anonymous CVS Login schrieb:> Commiter : cvs

CVSROOT : /home/sdlweb/libsdl.org/cvs
Module : SDL12
Commit time: 2006-03-23 15:25:41 UTC

Log message:

Hopefully fixed up DirectFB detection

Modified files:
configure.in


Index: SDL12/configure.in
diff -u SDL12/configure.in:1.248 SDL12/configure.in:1.249
— SDL12/configure.in:1.248 Wed Mar 22 23:44:52 2006
+++ SDL12/configure.in Thu Mar 23 07:25:30 2006
@@ -1063,15 +1063,9 @@
if test x$DIRECTFBCONFIG = x -o x$DIRECTFBCONFIG = x’"$DIRECTFBCONFIG"’; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test x$PKG_CONFIG != xno ; then

  •            AC_MSG_WARN([*** directfb-config or pkg-config are required to detect the DirectFB video driver.])
    
  •        else
               AC_MSG_CHECKING(for DirectFB $DIRECTFB_REQUIRED_VERSION support)
    
  •            if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
    
  •                AC_MSG_ERROR([*** pkg-config too old; version 0.7 or better required.])
    
  •            fi
    
  •            if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then
    
  •            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then then
                   DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
                   DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
                   video_directfb=yes
    


SDL-CVS mailing list
SDL-CVS at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl-cvs

./configure: line 27826: syntax error near unexpected token then' ./configure: line 27826: if $PKG_CONFIG
–atleast-pkgconfig-ver
sion 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION
directfb ;
then then’

Fixed, thanks!

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment