From 0f40a804f26df9d5bb5b8c2e7b9259cb1857bf0d Mon Sep 17 00:00:00 2001 From: Eric Weddington Date: Mon, 24 Feb 2003 23:13:55 +0000 Subject: [PATCH] Integrate Windows search of config files. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@231 81a1dc3b-b13d-400b-aceb-764788c761c2 --- avrdude/Makefile.am | 2 ++ avrdude/main.c | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/avrdude/Makefile.am b/avrdude/Makefile.am index 8d835a03..b0fd6905 100644 --- a/avrdude/Makefile.am +++ b/avrdude/Makefile.am @@ -37,6 +37,8 @@ avrdude_SOURCES = \ avrpart.h \ config.c \ config.h \ + confwin.c \ + confwin.h \ fileio.c \ fileio.h \ linux_ppdev.h \ diff --git a/avrdude/main.c b/avrdude/main.c index 4fd8a6bb..8c5515f6 100644 --- a/avrdude/main.c +++ b/avrdude/main.c @@ -44,6 +44,7 @@ #include "avr.h" #include "config.h" +#include "confwin.h" #include "fileio.h" #include "par.h" #include "pindefs.h" @@ -330,6 +331,14 @@ int main(int argc, char * argv []) do_cycles = 0; set_cycles = -1; + + #if defined(__CYGWIN__) + + win_sys_config_set(sys_config); + win_usr_config_set(usr_config); + + #else + strcpy(sys_config, CONFIG_DIR); i = strlen(sys_config); if (i && (sys_config[i-1] != '/')) @@ -345,6 +354,8 @@ int main(int argc, char * argv []) strcat(usr_config, "/"); strcat(usr_config, ".avrduderc"); } + + #endif len = strlen(progname) + 2; for (i=0; i