Need stdio.h for fprintf
[librfid] / include / librfid / rfid.h
index 0b98be6..e92cf58 100644 (file)
@@ -1,19 +1,21 @@
 #ifndef _RFID_H
 #define _RFID_H
 
-#include <stdio.h>
+#include <stddef.h>
+#include <sys/types.h>
 
-#ifdef __LIBRFID__
+#ifdef  __MINGW32__
+#define ENOTSUP         100
+#define ETIMEDOUT       101
+typedef unsigned char u_int8_t;
+typedef unsigned short u_int16_t;
+typedef unsigned long u_int32_t;
+typedef unsigned long long u_int64_t;
+#endif/*__MINGW32__*/
 
-#include <librfid/rfid_system.h>
+#ifdef  __LIBRFID__
 
-enum rfid_frametype {
-       RFID_14443A_FRAME_REGULAR,
-       RFID_14443B_FRAME_REGULAR,
-       RFID_MIFARE_FRAME,
-};
-
-#define DEBUG_LIBRFID
+#include <librfid/rfid_system.h>
 
 #ifdef DEBUG_LIBRFID
 
@@ -29,6 +31,8 @@ extern const char *rfid_hexdump(const void *data, unsigned int len);
 #define DEBUGPC(x, args ...) fprintf(stderr, x, ## args)
 #endif /* LIBRFID_FIRMWARE */
 
+#include <stdio.h>
+
 #else /* DEBUG */
 extern const char *rfid_hexdump(const void *data, unsigned int len);
 
@@ -53,4 +57,10 @@ enum rfid_opt_level {
        RFID_LEVEL_LAYER3,
 };
 
+enum rfid_frametype {
+       RFID_14443A_FRAME_REGULAR,
+       RFID_14443B_FRAME_REGULAR,
+       RFID_MIFARE_FRAME,
+};
+
 #endif /* _RFID_H */