diff options
author | joerg <joerg> | 2005-10-03 17:52:10 +0000 |
---|---|---|
committer | joerg <joerg> | 2005-10-03 17:52:10 +0000 |
commit | dcbe8ff7a96a238fe3fa8ef8313ccf78716238df (patch) | |
tree | a3ac7277a7158db7ff2d4696e32157ddec25e71a /x11/XmHTML/patches | |
parent | b5d1ad666e9d9c824cf1c6535b9eca487bc747bd (diff) | |
download | pkgsrc-dcbe8ff7a96a238fe3fa8ef8313ccf78716238df.tar.gz |
stdout may not be a link-time constant. E.g. on DragonFly, it is just an
extern pointer. Move the compile-time initialisation to run time.
Diffstat (limited to 'x11/XmHTML/patches')
-rw-r--r-- | x11/XmHTML/patches/patch-ai | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/x11/XmHTML/patches/patch-ai b/x11/XmHTML/patches/patch-ai new file mode 100644 index 00000000000..a87a7a815ae --- /dev/null +++ b/x11/XmHTML/patches/patch-ai @@ -0,0 +1,42 @@ +$NetBSD: patch-ai,v 1.1 2005/10/03 17:52:10 joerg Exp $ + +--- lib/common/debug.c.orig 2005-08-16 19:40:17.000000000 +0000 ++++ lib/common/debug.c +@@ -110,7 +110,7 @@ int debug_disable_warnings = 0; + /*** Private Function Prototype Declarations ****/ + + /*** Private Variable Declarations ***/ +-static FILE *__rsd_debug_file = stdout; ++static FILE *__rsd_debug_file = NULL; + + /***** + * When debug output is send to a file, we register an exit func to close +@@ -128,7 +128,8 @@ __rsd_at_exit(void) + #endif + { + /* close output file */ +- fclose(__rsd_debug_file); ++ if (__rsd_debug_file != NULL) ++ fclose(__rsd_debug_file); + } + + /***** +@@ -159,6 +160,9 @@ __rsd_fprintf(fmt, va_alist) + va_start(arg_list); + #endif /* __STDC__ */ + ++ if (__rsd_debug_file == NULL) ++ __rsd_debug_file = stdout; ++ + /* flush to file */ + vfprintf(__rsd_debug_file, fmt, arg_list); + va_end(arg_list); +@@ -298,7 +302,7 @@ __rsd_setDebugLevels(int *argc, char **a + if((chPtr = strstr(argv[i], ":")) != NULL) + { + /* close any existing output file */ +- if(__rsd_debug_file != stdout) ++ if(__rsd_debug_file != stdout && __rsd_debug_file != NULL) + fclose(__rsd_debug_file); + + chPtr++; /* skip : */ |