mirror of https://github.com/BOINC/boinc.git
Minor mods to allow BOINC apps to be compiled under Windows using Dev-C++
with MinGW svn path=/trunk/boinc/; revision=9013
This commit is contained in:
parent
413c161c36
commit
c166c6beab
|
@ -24,7 +24,11 @@
|
|||
#if defined(_WIN32)
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
#ifndef __MINGW32__
|
||||
# include <GL/glaux.h>
|
||||
#else
|
||||
# include <GL/glext.h>
|
||||
#endif
|
||||
# include <glut.h>
|
||||
|
||||
#elif defined(__APPLE_CC__)
|
||||
|
|
|
@ -70,15 +70,9 @@ int boinc_init_options_graphics_lib(
|
|||
boinc_main_state.set_worker_timer_hook = set_worker_timer;
|
||||
boinc_main_state.app_client_shmp = &app_client_shm;
|
||||
|
||||
// figure out name of executable, and append .so
|
||||
//
|
||||
if ((ptr = strrchr(argv0, '/'))) {
|
||||
ptr++;
|
||||
} else {
|
||||
ptr = argv0;
|
||||
}
|
||||
ptr = argv0;
|
||||
strcpy(graphics_lib, ptr);
|
||||
strncat(graphics_lib, ".so", BOINC_STRLEN);
|
||||
strncat(graphics_lib, DLLEXT, BOINC_STRLEN);
|
||||
graphics_lib[BOINC_STRLEN-1] = 0;
|
||||
|
||||
// boinc-resolve library name: it could be a XML symlink
|
||||
|
@ -88,6 +82,7 @@ int boinc_init_options_graphics_lib(
|
|||
"Unable to boinc_resolve name of shared object file %s\n",
|
||||
graphics_lib
|
||||
);
|
||||
fflush(stderr);
|
||||
goto no_graphics;
|
||||
}
|
||||
|
||||
|
@ -102,6 +97,7 @@ int boinc_init_options_graphics_lib(
|
|||
fprintf(stderr,
|
||||
"dlopen() failed: %s\nNo graphics.\n", errormsg?errormsg:""
|
||||
);
|
||||
fflush(stderr);
|
||||
goto no_graphics;
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ public:
|
|||
#define ALIGN_CENTER 1
|
||||
#define ALIGN_TOP 2
|
||||
|
||||
extern unsigned int* read_rgb_texture (const char *, int*, int* ,int *);
|
||||
unsigned int* read_rgb_texture (const char *, int*, int* ,int *);
|
||||
|
||||
struct TEXTURE_DESC {
|
||||
bool present;
|
||||
|
|
|
@ -61,16 +61,25 @@
|
|||
#include <winsock.h>
|
||||
#include <wininet.h>
|
||||
#include <process.h>
|
||||
#ifdef __MINGW32__
|
||||
#include <pbt.h>
|
||||
#endif
|
||||
|
||||
#include <commctrl.h>
|
||||
#include <raserror.h>
|
||||
#include <mmsystem.h>
|
||||
#include <direct.h>
|
||||
#include <io.h>
|
||||
#ifndef __MINGW32__
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
#include <tchar.h>
|
||||
#ifndef __MINGW32__
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
#ifndef __MINGW32__
|
||||
#include <delayimp.h>
|
||||
|
||||
#endif
|
||||
// All projects should be using std::min and std::max instead of the Windows
|
||||
// version of the symbols.
|
||||
#undef min
|
||||
|
@ -91,8 +100,8 @@
|
|||
#include <cmath>
|
||||
#include <csetjmp>
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <cfloat>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
#include "stackwalker_win.h"
|
||||
#endif
|
||||
|
||||
|
@ -374,9 +374,11 @@ LONG CALLBACK boinc_catch_signal(EXCEPTION_POINTERS *pExPtrs) {
|
|||
}
|
||||
fflush( stderr );
|
||||
|
||||
#ifndef __MINGW32__
|
||||
// Unwind the stack and spew it to stderr
|
||||
if (flags & BOINC_DIAG_DUMPCALLSTACKENABLED )
|
||||
StackwalkFilter( pExPtrs, EXCEPTION_EXECUTE_HANDLER, NULL );
|
||||
#endif
|
||||
|
||||
fprintf( stderr, "Exiting...\n" );
|
||||
fflush( stderr );
|
||||
|
|
|
@ -129,9 +129,15 @@ extern void boinc_info_release(const char *pszFormat, ...);
|
|||
|
||||
#else // _DEBUG
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#define BOINCASSERT(expr)
|
||||
#define BOINCTRACE(...)
|
||||
#define BOINCINFO boinc_info_release
|
||||
#else // __MINGW32__
|
||||
#define BOINCASSERT(expr) __noop
|
||||
#define BOINCTRACE __noop
|
||||
#define BOINCINFO boinc_info_release
|
||||
#endif // __MINGW32__
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#ifndef __STACKWALKER_H__
|
||||
#define __STACKWALKER_H__
|
||||
|
||||
#include "boinc_win.h"
|
||||
// Only valid in the following environment: Intel platform, MS VC++ 5/6/7
|
||||
#ifndef _X86_
|
||||
#error Only INTEL envirnoments are supported!
|
||||
|
|
|
@ -40,7 +40,9 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_SYS_FILE_H
|
||||
|
@ -48,6 +50,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#include "error_numbers.h"
|
||||
#include "filesys.h"
|
||||
#include "util.h"
|
||||
|
|
|
@ -194,7 +194,7 @@ fcgi_LDADD = $(LDADD) $(RSA_LIBS) -lfcgi $(MYSQL_LIBS)
|
|||
.PHONY: PHONY-start
|
||||
|
||||
PHONY-start:
|
||||
@test -f start || ln -s $(srcdir)/start start && test -f start
|
||||
@test -f start || @LN_S@ $(srcdir)/start start && test -f start
|
||||
|
||||
status stop: PHONY-start
|
||||
@test -f $@ || ln -s start $@ && test -f $@
|
||||
@test -f $@ || @LN_S@ start $@ && test -f $@
|
||||
|
|
Loading…
Reference in New Issue