Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 5045) +++ trunk/doc-rnd/hacking/renames (revision 5046) @@ -1042,3 +1042,4 @@ MAX_SIZE -> PCB_MAX_SIZE MAX_BUFFER -> PCB_MAX_BUFFER DEFAULT_DRILLINGHOLE -> PCB_DEFAULT_DRILLINGHOLE +MAXPATHLEN -> PCB_PATH_MAX Index: trunk/src/compat_fs.c =================================================================== --- trunk/src/compat_fs.c (revision 5045) +++ trunk/src/compat_fs.c (revision 5046) @@ -59,9 +59,9 @@ char *pcb_get_wd(char *path) { #if defined(HAVE_GETCWD) - return getcwd(path, MAXPATHLEN); + return getcwd(path, PCB_PATH_MAX); #elif defined(HAVE__GETCWD) - return _getcwd(path, MAXPATHLEN); + return _getcwd(path, PCB_PATH_MAX); #else /* seems that some BSD releases lack of a prototype for getwd() */ return getwd(path); Index: trunk/src/compat_lrealpath.c =================================================================== --- trunk/src/compat_lrealpath.c (revision 5045) +++ trunk/src/compat_lrealpath.c (revision 5046) @@ -53,8 +53,8 @@ #if defined (PATH_MAX) #define REALPATH_LIMIT PATH_MAX #else -#if defined (MAXPATHLEN) -#define REALPATH_LIMIT MAXPATHLEN +#if defined (PCB_PATH_MAX) +#define REALPATH_LIMIT PCB_PATH_MAX #endif #endif #else Index: trunk/src/conf.c =================================================================== --- trunk/src/conf.c (revision 5045) +++ trunk/src/conf.c (revision 5046) @@ -282,7 +282,7 @@ const char *conf_get_project_conf_name(const char *project_fn, const char *pcb_fn, const char **try) { - static char res[MAXPATHLEN]; + static char res[PCB_PATH_MAX]; static const char *project_name = "project.lht"; FILE *f; Index: trunk/src/globalconst.h =================================================================== --- trunk/src/globalconst.h (revision 5045) +++ trunk/src/globalconst.h (revision 5046) @@ -83,11 +83,11 @@ #define PCB_MAX_SIZE PCB_MAX_PINORVIASIZE #endif -#ifndef MAXPATHLEN /* maximum path length */ +#ifndef PCB_PATH_MAX /* maximum path length */ #ifdef PATH_MAX -#define MAXPATHLEN PATH_MAX +#define PCB_PATH_MAX PATH_MAX #else -#define MAXPATHLEN 2048 +#define PCB_PATH_MAX 2048 #endif #endif Index: trunk/src/plug_footprint.c =================================================================== --- trunk/src/plug_footprint.c (revision 5045) +++ trunk/src/plug_footprint.c (revision 5046) @@ -329,7 +329,7 @@ */ static int fp_read_lib_all_(const char *searchpath) { - char toppath[MAXPATHLEN + 1]; /* String holding abs path to top level library dir */ + char toppath[PCB_PATH_MAX + 1]; /* String holding abs path to top level library dir */ char *libpaths; /* String holding list of library paths to search */ char *p; /* Helper string used in iteration */ int n_footprints = 0; /* Running count of footprints found */ Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 5045) +++ trunk/src/plug_io.c (revision 5046) @@ -480,7 +480,7 @@ { FILE *fp = NULL; struct stat buffer; - char message[MAXPATHLEN + 80]; + char message[PCB_PATH_MAX + 80]; int response; if (Filename && *Filename) { Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 5045) +++ trunk/src_plugins/export_gcode/gcode.c (revision 5046) @@ -418,7 +418,7 @@ /* ***************** gcode conversion *************************** */ /* potrace uses a different kind of bitmap; for simplicity gcode_im is copied to this format */ bm = bm_new(gdImageSX(gcode_im), gdImageSY(gcode_im)); - filename = (char *) malloc(MAXPATHLEN); + filename = (char *) malloc(PCB_PATH_MAX); plist = NULL; if (is_solder) { /* only for back layer */ gdImagePtr temp_im = gdImageCreate(gdImageSX(gcode_im), gdImageSY(gcode_im)); Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 5045) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 5046) @@ -112,9 +112,9 @@ int (*cb) (void *cookie, const char *subdir, const char *name, pcb_fptype_t type, void *tags[]), void *cookie, int subdir_may_not_exist, int need_tags) { - char olddir[MAXPATHLEN + 1]; /* The directory we start out in (cwd) */ - char new_subdir[MAXPATHLEN + 1]; - char fn[MAXPATHLEN + 1], *fn_end; + char olddir[PCB_PATH_MAX + 1]; /* The directory we start out in (cwd) */ + char new_subdir[PCB_PATH_MAX + 1]; + char fn[PCB_PATH_MAX + 1], *fn_end; DIR *subdirobj; /* Interable object holding all subdir entries */ struct dirent *subdirentry; /* Individual subdir entry */ struct stat buffer; /* Buffer used in stat */ @@ -222,7 +222,7 @@ { list_st_t l; list_dir_t *d, *nextd; - char working_[MAXPATHLEN + 1]; + char working_[PCB_PATH_MAX + 1]; const char *visible_subdir; char *working; /* String holding abs path to working dir */ @@ -290,7 +290,7 @@ static char *fp_fs_search(const char *search_path, const char *basename, int parametric) { const char *p, *end; - char path[MAXPATHLEN + 1]; + char path[PCB_PATH_MAX + 1]; fp_search_t ctx; if ((*basename == '/') || (*basename == PCB_DIR_SEPARATOR_C))