Skip to content

Commit

Permalink
Merge pull request #87 from slimsag/master
Browse files Browse the repository at this point in the history
Fix undefined symbols on Windows. See #82
  • Loading branch information
tapir committed Aug 30, 2014
2 parents c2014e4 + 6463fad commit 22c8f61
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions glfw_win32_init.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
#ifdef _GLFW_WIN32

// Bug fix for 6l/8l on Windows, see:
// https://github.com/go-gl/glfw3/issues/82#issuecomment-53859967
#include <stdlib.h>
#include <string.h>

#ifndef strdup
char *strdup (const char *str) {
char *new = malloc(strlen(str));
strcpy(new, str);
return new;
}
#endif

// http://msdn.microsoft.com/en-us/library/571yb472.aspx
#include <stdio.h>
#ifndef _get_output_format
unsigned int _get_output_format(void) {
return 0;
};
#endif

#include "glfw/src/win32_init.c"
#endif

0 comments on commit 22c8f61

Please sign in to comment.