made the header compatible with C++
authorJohn Tsiombikas <nuclear@member.fsf.org>
Wed, 27 May 2020 07:02:11 +0000 (10:02 +0300)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Wed, 27 May 2020 07:02:11 +0000 (10:02 +0300)
miniglut.h

index f5b2daf..a7b8659 100644 (file)
@@ -102,6 +102,9 @@ typedef void (*glut_cb_motion)(int x, int y);
 typedef void (*glut_cb_sbmotion)(int x, int y, int z);
 typedef void (*glut_cb_sbbutton)(int bn, int state);
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 void glutInit(int *argc, char **argv);
 void glutInitWindowPosition(int x, int y);
@@ -154,4 +157,8 @@ void glutWireTorus(float inner_rad, float outer_rad, int sides, int rings);
 void glutSolidTeapot(float size);
 void glutWireTeapot(float size);
 
+#ifdef __cplusplus
+}      /* extern "C" */
+#endif
+
 #endif /* MINIGLUT_H_ */