z80 linker build using MSVC
[fw/sdcc] / link / z80 / aslink.h
index 9ef08c54ea233d437aadf8567f6c0a101109b9f3..bdb0404ab6236b2fad91f60a663612cca4d90a1b 100644 (file)
 /*
  * Extensions: P. Felber
  */
+#include <limits.h>
+
+#ifndef PATH_MAX
+ #if defined(__BORLANDC__) || defined(_MSC_VER)
+  #include <stdlib.h>
+  #define PATH_MAX     _MAX_PATH
+ #else
+  #define PATH_MAX     255     /* define a reasonable value */
+ #endif
+#endif
 
 #define        VERSION "V01.75"
 
 #endif /* SDK */
 /* #define     NCPS    32 */   /* characters per symbol */
 #define        NDATA   16              /* actual data */
-#define        NINPUT  128             /* Input buffer size */
+#define        NINPUT  PATH_MAX        /* Input buffer size */
 #define        NHASH   64              /* Buckets in hash table */
 #define        HMASK   077             /* Hash mask */
 #define        NLPP    60              /* Lines per page */
 #define        NTXT    16              /* T values */
-/** PENDING: Taking this to 256 causes a segfault. */
-#define        FILSPC  100             /* File spec length */
+#define        FILSPC  PATH_MAX        /* File spec length */
 
 /*
  *     The "R_" relocation constants define values used in