Use X_LIBS from pkg-config, instead of libdir, for locating libX11
[mesa.git] / progs / xdemos / corender.c
index 02e4ac02162a47d5db4102217a3545e957dff2a4..e706f4b3da51c795862596a863448e959e3bb524 100644 (file)
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <X11/keysym.h>
 #include <unistd.h>
 #include "ipc.h"
 
 
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
 static int MyID = 0;  /* 0 or 1 */
 static int WindowID = 0;
 static GLXContext Context = 0;
@@ -51,6 +54,7 @@ setup_ipc(void)
 
       printf("Waiting for connection from another 'corender'\n");
       Sock = AcceptConnection(k);
+      assert(Sock != -1);
 
       printf("Got connection, sending windowID\n");
 
@@ -182,7 +186,7 @@ redraw(Display *dpy)
        * Without this glClear(), depth buffer for the second process
        * is pretty much broken.
        */
-      //glClear(GL_DEPTH_BUFFER_BIT);
+      /* glClear(GL_DEPTH_BUFFER_BIT); */
 
       glPushMatrix();
       glTranslatef(1, 0, 0);