On Sat, Nov 21, 2009 at 7:14 PM, Zach Welch <z...@superlucidity.net> wrote: > On Sat, 2009-11-21 at 16:53 +0100, Andreas Fritiofson wrote: >> Add $HOME/.openocd as the first default script search directory, allowing >> the user to override the standard scripts. > > Comments are in-line and at the end. > >> Signed-off-by: Andreas Fritiofson <andreas.fritiof...@gmail.com> >> --- >> src/helper/options.c | 16 +++++++++++++++- >> 1 files changed, 15 insertions(+), 1 deletions(-) >> >> diff --git a/src/helper/options.c b/src/helper/options.c >> index 5792e11..2187ff7 100644 >> --- a/src/helper/options.c >> +++ b/src/helper/options.c >> @@ -29,6 +29,7 @@ >> #include "server.h" >> >> #include <getopt.h> >> +#include <stdlib.h> >> >> static int help_flag, version_flag; >> >> @@ -54,6 +55,10 @@ int configuration_output_handler(struct command_context >> *context, const char* li >> >> static void add_default_dirs(void) >> { >> +#ifndef MAX_PATH >> +#define MAX_PATH 1024 >> +#endif >> + > > PATH_MAX should be defined and available (in <limits.h>). Use it.
Why not just allocate dynamically and avoid the problem at the root? There *is* no PATH_MAX in Windows really. -- Øyvind Harboe http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development