Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 38 lines (23 sloc) 0.693 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
#ifndef COMPAT_H
#define COMPAT_H

#ifdef __WIN32__

/* Windows variants of various things */

#define JOYSTICK_DEV_OPEN_FLAGS O_RDONLY
#define srandom srand
#define random rand

/* End of Windows variants of various things */

#else
#ifdef __linux__

/* Linux variants of various things */

#define JOYSTICK_DEV_OPEN_FLAGS O_RDONLY | O_NONBLOCK
#define HAS_LINUX_JOYSTICK_INTERFACE 1
#define O_BINARY 0

/* End of Linux variants of various things */

#else

/* Generic variants of various things */

#define JOYSTICK_DEV_OPEN_FLAGS O_RDONLY | O_NONBLOCK
#define O_BINARY 0

/* End of generic variants of various things */

#endif /* __linux__ */
#endif /* __WIN32__ */
#endif /* COMPAT_H */

Something went wrong with that request. Please try again.