diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-11-01 21:53:30 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-11-01 21:53:30 +0000 |
commit | 4d4023555b8c4e5812d2ac67242fe7754acc6def (patch) | |
tree | 17036a33b500972a312f1a5b2c75bee313f4b4d1 /config.c | |
parent | a68250b79bf5358b7cf67bbd9185409a17993abc (diff) |
issue #4678
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6936 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'config.c')
-rwxr-xr-x | config.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -33,7 +33,7 @@ #include <sys/stat.h> #define AST_INCLUDE_GLOB 1 #ifdef AST_INCLUDE_GLOB -#ifdef __Darwin__ +#if defined(__Darwin__) || defined(__CYGWIN__) #define GLOB_ABORTED GLOB_ABEND #endif # include <glob.h> @@ -693,7 +693,11 @@ int config_text_file_save(const char *configfile, const struct ast_config *cfg, } time(&t); ast_copy_string(date, ctime(&t), sizeof(date)); +#ifdef __CYGWIN__ + if ((f = fopen(fn, "w+"))) { +#else if ((f = fopen(fn, "w"))) { +#endif if ((option_verbose > 1) && !option_debug) ast_verbose( VERBOSE_PREFIX_2 "Saving '%s': ", fn); fprintf(f, ";!\n"); |