projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixing bug 3292122 from Nigel Stewart (thanks, Nigel) so that "freeglut" will build...
[freeglut]
/
src
/
freeglut_input_devices.c
diff --git
a/src/freeglut_input_devices.c
b/src/freeglut_input_devices.c
index
493bcd8
..
04f5fd5
100755
(executable)
--- a/
src/freeglut_input_devices.c
+++ b/
src/freeglut_input_devices.c
@@
-35,25
+35,23
@@
#include <GL/freeglut.h>
#include "freeglut_internal.h"
#include <GL/freeglut.h>
#include "freeglut_internal.h"
-#if TARGET_HOST_UNIX_X11
+#if TARGET_HOST_POSIX_X11
+#ifdef HAVE_ERRNO_H
#include <errno.h>
#include <errno.h>
+#endif
#include <sys/ioctl.h>
#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <string.h>
#include <termios.h>
#include <fcntl.h>
#include <string.h>
#include <termios.h>
#include <fcntl.h>
-#include <sys/types.h>
typedef struct {
int fd;
struct termios termio, termio_save;
} SERIALPORT;
typedef struct {
int fd;
struct termios termio, termio_save;
} SERIALPORT;
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_MS_WINDOWS
#include <sys/types.h>
#include <winbase.h>
typedef struct {
#include <sys/types.h>
#include <winbase.h>
typedef struct {
@@
-136,11
+134,11
@@
int fgInputDeviceDetect( void )
*/
void fgInitialiseInputDevices ( void )
{
*/
void fgInitialiseInputDevices ( void )
{
- const char *dial_device=NULL;
if( !fgState.InputDevsInitialised )
{
if( !fgState.InputDevsInitialised )
{
+ const char *dial_device=NULL;
dial_device = getenv ( "GLUT_DIALS_SERIAL" );
dial_device = getenv ( "GLUT_DIALS_SERIAL" );
-#if TARGET_HOST_WIN32
+#if TARGET_HOST_MS_WINDOWS
if (!dial_device){
static char devname[256];
DWORD size=sizeof(devname);
if (!dial_device){
static char devname[256];
DWORD size=sizeof(devname);
@@
-250,7
+248,7
@@
static void poll_dials ( int id )
/******** OS Specific Serial I/O routines *******/
/******** OS Specific Serial I/O routines *******/
-#if TARGET_HOST_UNIX_X11 /* ==> Linux/BSD/UNIX POSIX serial I/O */
+#if TARGET_HOST_POSIX_X11 /* ==> Linux/BSD/UNIX POSIX serial I/O */
static SERIALPORT *serial_open ( const char *device )
{
int fd;
static SERIALPORT *serial_open ( const char *device )
{
int fd;
@@
-313,7
+311,7
@@
static void serial_flush ( SERIALPORT *port )
tcflush ( port->fd, TCIOFLUSH );
}
tcflush ( port->fd, TCIOFLUSH );
}
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_MS_WINDOWS
static SERIALPORT *serial_open(const char *device){
HANDLE fh;
static SERIALPORT *serial_open(const char *device){
HANDLE fh;