Clean up #includes
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 23 Jan 2016 21:08:50 +0000 (08:08 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 23 Jan 2016 21:08:55 +0000 (08:08 +1100)
Patch-from: lvqcl <lvqcl.mail@gmail.com>

include/share/endswap.h
src/libFLAC/stream_encoder.c
src/metaflac/main.c

index b189f3e..94ce302 100644 (file)
@@ -45,7 +45,9 @@ static inline unsigned short __builtin_bswap16(unsigned short a)
 #define        ENDSWAP_32(x)           (__builtin_bswap32 (x))
 #define        ENDSWAP_64(x)           (__builtin_bswap64 (x))
 
-#elif defined _MSC_VER         /* Windows. Apparently in <stdlib.h>. */
+#elif defined _MSC_VER         /* Windows */
+
+#include <stdlib.h>
 
 #define        ENDSWAP_16(x)           (_byteswap_ushort (x))
 #define        ENDSWAP_32(x)           (_byteswap_ulong (x))
index a4cf393..62a3437 100644 (file)
 #include <stdlib.h> /* for malloc() */
 #include <string.h> /* for memcpy() */
 #include <sys/types.h> /* for off_t */
+#ifdef _WIN32
+#include <windows.h> /* for GetFileType() */
+#include <io.h> /* for _get_osfhandle() */
+#endif
 #include "share/compat.h"
 #include "FLAC/assert.h"
 #include "FLAC/stream_decoder.h"
index eb8737a..e77372b 100644 (file)
@@ -25,6 +25,7 @@
 #include "options.h"
 #include <locale.h>
 #include <stdlib.h>
+#include <string.h>
 #include "share/compat.h"
 
 int main(int argc, char *argv[])