Skip to content

Commit

Permalink
mingw32 support
Browse files Browse the repository at this point in the history
  • Loading branch information
taviso committed Apr 28, 2009
1 parent 47f471e commit 5c04526
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ ttf2eot: OpenTypeUtilities.o ttf2eot.o
g++ -o $@ $^ g++ -o $@ $^


clean: clean:
rm -f *.o *.core core ttf2eot *.eot rm -f *.o *.core *.obj *.exe core ttf2eot
9 changes: 5 additions & 4 deletions ttf2eot.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
#ifndef _MSC_VER #ifndef _MSC_VER
# include <stdint.h> # include <stdint.h>
#else #else
// setmode() headers typedef unsigned char uint8_t;
#endif

#if defined(_MSC_VER) || defined(__MINGW32__)
# include <io.h> # include <io.h>
# include <fcntl.h> # include <fcntl.h>
# ifndef _O_BINARY # ifndef _O_BINARY
Expand All @@ -20,8 +23,6 @@
# ifndef _O_TEXT # ifndef _O_TEXT
# define _O_TEXT 0x4000 # define _O_TEXT 0x4000
# endif # endif

typedef unsigned char uint8_t;
#endif #endif


#include "OpenTypeUtilities.h" #include "OpenTypeUtilities.h"
Expand All @@ -44,7 +45,7 @@ int main(int argc, char **argv)
FILE *input; FILE *input;
unsigned char *fontData; unsigned char *fontData;


#ifdef _MSC_VER #if defined(_MSC_VER) || defined(__MINGW32__)
setmode(_fileno(stdin), _O_BINARY); setmode(_fileno(stdin), _O_BINARY);
setmode(_fileno(stdout), _O_BINARY); setmode(_fileno(stdout), _O_BINARY);
setmode(_fileno(stderr), _O_TEXT); setmode(_fileno(stderr), _O_TEXT);
Expand Down

0 comments on commit 5c04526

Please sign in to comment.