Fix a redefinition warning for the ERROR macro.
Apparantly, the windows wingdi.h header file already defines the ERROR macro. By defining the NOGDI macro before including the windows.h header file, we can prevent the wingdi.h file from being included and thus avoid the warning. We don't need that header for anything anyway. Because the libusb header file includes the windows.h file explicitly, it needs the same fix.
This commit is contained in:
parent
f65f808b6c
commit
113d2e4706
@ -27,6 +27,9 @@
|
||||
#include <stdlib.h> // malloc, free
|
||||
|
||||
#ifdef HAVE_LIBUSB
|
||||
#ifdef _WIN32
|
||||
#define NOGDI
|
||||
#endif
|
||||
#include <libusb-1.0/libusb.h>
|
||||
#endif
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define NOGDI
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include <stdlib.h> // malloc, free
|
||||
#include <stdio.h> // snprintf
|
||||
#ifdef _WIN32
|
||||
#define NOGDI
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <af_irda.h>
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define NOGDI
|
||||
#include <windows.h>
|
||||
|
||||
#include "serial.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user