Mods for getting SETI@home working under windows

svn path=/trunk/boinc/; revision=2221
This commit is contained in:
Eric J. Korpela 2003-09-02 23:26:38 +00:00
parent f1eceb8605
commit c392bbca88
3 changed files with 60 additions and 11 deletions

View File

@ -17,25 +17,52 @@
// Contributor(s):
//
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#endif
#ifdef __APPLE_CC__
#ifdef HAVE_GL_H
#include "gl.h"
#elif defined(HAVE_GL_GL_H)
#include <GL/gl.h>
#elif defined(HAVE_OPENGL_GL_H)
#include <OpenGL/gl.h>
#endif
#ifdef HAVE_GLU_H
#include "glu.h"
#elif defined(HAVE_GL_GLU_H)
#include <GL/glu.h>
#elif defined(HAVE_OPENGL_GLU_H)
#include <OpenGL/glu.h>
#endif
#ifdef HAVE_GLUT_H
#include "glut.h"
#elif defined(HAVE_GL_GLUT_H)
#include <GL/glut.h>
#elif defined(HAVE_OPENGL_GLUT_H)
#include <OpenGL/glut.h>
#elif defined(HAVE_GLUT_GLUT_H)
#include <GLUT/glut.h>
#endif
#ifdef unix
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#endif
// the old way
// #ifdef __APPLE_CC__
// #include <OpenGL/gl.h>
// #include <GLUT/glut.h>
// #endif
// #ifdef unix
// #include <GL/gl.h>
// #include <GL/glu.h>
// #include <GL/glut.h>
// #endif
#include "gutil.h"
GLfloat mat_diffuse[] = {0.7, 0.5, 1.0, 0.4};

View File

@ -15,7 +15,7 @@ inline T min(const T &a, const T &b) {
}
#endif
#ifndef HAVE_STD_MIN
#ifndef HAVE_STD_MAX
namespace std {
#ifdef max
#undef max
@ -29,5 +29,26 @@ inline T max(const T &a, const T &b) {
}
#endif
#ifndef HAVE_STD_TRANSFORM
#include <algorithm>
#include <iterator>
namespace std {
#ifdef transform
#undef transform
#endif
template <typename i_iterator, typename o_iterator, typename OP>
o_iterator transform(i_iterator first, i_iterator last, o_iterator res, OP op) {
for (;first != last; first++) {
*(res++)=op(*first);
}
return (res);
}
}
#endif
#endif

View File

@ -27,8 +27,9 @@
#include <cctype>
#include <cstring>
#include <cstdarg>
#include <string>
#include <algorithm>
#include <string>
using std::string;
extern int double_to_ydhms (double x, int smallest_timescale, char *buf);