Statistics
| Revision:

gvsig-raster / libjni-potrace / trunk / libjni-potrace / resources / potrace-1.8 / src / platform.h @ 1780

History | View | Annotate | Download (705 Bytes)

1
/* Copyright (C) 2001-2007 Peter Selinger.
2
   This file is part of Potrace. It is free software and it is covered
3
   by the GNU General Public License. See the file COPYING for details. */
4

    
5
/* this header file contains some platform dependent stuff */
6

    
7
#ifndef PLATFORM_H
8
#define PLATFORM_H
9

    
10
#ifdef HAVE_CONFIG_H
11
#include "config.h"
12
#endif
13

    
14
/* in Windows, set all file i/o to binary */
15
#ifdef __MINGW32__
16
#include <fcntl.h>
17
unsigned int _CRT_fmode = _O_BINARY;
18
#endif
19

    
20
#ifdef __CYGWIN__
21
#include <fcntl.h>
22
#include <io.h>
23
static inline void platform_init(void) {
24
  setmode(0,O_BINARY); 
25
  setmode(1,O_BINARY);
26
}
27
#else
28
static inline void platform_init(void) {
29
  /* NOP */
30
}
31
#endif
32

    
33
#endif /* PLATFORM_H */