Browse Source

Put header include guards completely inside of _WIN32 check

rexim 2 years ago
parent
commit
dbb5e7eb1d
1 changed files with 5 additions and 4 deletions
  1. 5 4
      minirent.h

+ 5 - 4
minirent.h

@@ -33,13 +33,13 @@
 //          platforms
 //    0.0.1 First Official Release
 
-#ifndef MINIRENT_H_
-#define MINIRENT_H_
-
 #ifndef _WIN32
 #include <dirent.h>
 #else // _WIN32
 
+#ifndef MINIRENT_H_
+#define MINIRENT_H_
+
 #define WIN32_LEAN_AND_MEAN
 #include "windows.h"
 
@@ -54,6 +54,8 @@ DIR *opendir(const char *dirpath);
 struct dirent *readdir(DIR *dirp);
 int closedir(DIR *dirp);
 
+#endif // MINIRENT_H_
+
 #ifdef MINIRENT_IMPLEMENTATION
 
 struct DIR
@@ -139,4 +141,3 @@ int closedir(DIR *dirp)
 
 #endif // MINIRENT_IMPLEMENTATION
 #endif // _WIN32
-#endif // MINIRENT_H_