Browse Source

Use seperate blog for MAX_FILEPATH_LENGTH define

Let's have a seperate if linux block for this. Since we will need to
define MAX_FILEPATH_LENGTH for all other cases. And its more readable
like this.
Michael Vetter 6 years ago
parent
commit
65b5de962d
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/core.c

+ 6 - 2
src/core.c

@@ -159,7 +159,6 @@
             unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
             unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
         #endif
         #endif
 
 
-        #define MAX_FILEPATH_LENGTH 256
     #elif defined(__linux__)
     #elif defined(__linux__)
         #include <sys/time.h>           // Required for: timespec, nanosleep(), select() - POSIX
         #include <sys/time.h>           // Required for: timespec, nanosleep(), select() - POSIX
         
         
@@ -175,9 +174,14 @@
         #define GLFW_EXPOSE_NATIVE_NSGL
         #define GLFW_EXPOSE_NATIVE_NSGL
         #include <GLFW/glfw3native.h>   // Required for: glfwGetCocoaWindow(), glfwGetNSGLContext()
         #include <GLFW/glfw3native.h>   // Required for: glfwGetCocoaWindow(), glfwGetNSGLContext()
 
 
+    #endif
+#endif
+
+#if defined(__linux__)
         #include <linux/limits.h> // for NAME_MAX and PATH_MAX defines
         #include <linux/limits.h> // for NAME_MAX and PATH_MAX defines
         #define MAX_FILEPATH_LENGTH PATH_MAX // Use Linux define (4096)
         #define MAX_FILEPATH_LENGTH PATH_MAX // Use Linux define (4096)
-    #endif
+#else
+        #define MAX_FILEPATH_LENGTH 256 // Use common value
 #endif
 #endif
 
 
 #if defined(PLATFORM_ANDROID)
 #if defined(PLATFORM_ANDROID)