replace FILENAME_MAX with PATH_MAX
[fw/sdcc] / src / SDCCglobl.h
index 07eec1dd9cccd15c003fb31daa1721d216c73c9a..3df24562d11f28a698b5d10da1d19ff45401c298 100644 (file)
 #define SPACE ' '
 #define ZERO  0
 
+#include <limits.h>            /* PATH_MAX                  */
+#ifndef PATH_MAX               /* POSIX, but not required   */
+#define PATH_MAX 255           /* define a reasonable value */
+#endif
+
 #define  MAX_FNAME_LEN  128
 #define  MAX_REG_PARMS  1
 typedef int bool;
@@ -316,6 +321,6 @@ extern struct _dumpFiles dumpFiles[];
 /* Buffer which can be used to hold a file name; assume it will
  * be trashed by any function call within SDCC.
  */
-extern char scratchFileName[FILENAME_MAX];
+extern char scratchFileName[PATH_MAX];
 
 #endif