-#define LRAND() ((long) (random() & 0x7fffffff))
-#define NRAND(n) ((int) (LRAND() % (n)))
-#define MAXRAND (2147483648.0) /* unsigned 1<<31 as a float */
-#define SRAND(n) /* already seeded by screenhack.c */
+# ifndef HAVE_MESA_GL
+# if defined(__sun) && defined(__SVR4) /* Solaris */
+# define SUN_OGL_NO_VERTEX_MACROS 1
+# endif /* Solaris */
+# endif /* !HAVE_MESA_GL */
+
+# ifdef HAVE_COCOA
+# ifndef USE_IPHONE
+# include <OpenGL/gl.h>
+# include <OpenGL/glu.h>
+# endif
+# elif defined(HAVE_ANDROID)
+# include <GLES/gl.h>
+# else
+# include <GL/gl.h>
+# include <GL/glu.h>
+# include <GL/glx.h>
+# endif
+
+# ifdef HAVE_JWZGLES
+# include "jwzgles.h"
+# endif /* HAVE_JWZGLES */
+
+
+ extern GLXContext *init_GL (ModeInfo *);
+ extern void xlockmore_reset_gl_state(void);
+ extern void clear_gl_error (void);
+ extern void check_gl_error (const char *type);
+
+ extern Visual *xlockmore_pick_gl_visual (Screen *);
+ extern Bool xlockmore_validate_gl_visual (Screen *, const char *, Visual *);
+
+#endif /* !USE_GL */