diff options
author | joerg <joerg@pkgsrc.org> | 2005-10-03 17:52:10 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2005-10-03 17:52:10 +0000 |
commit | 14bbb2fd6ec0aa812b2aa99d58814ca503cdddd9 (patch) | |
tree | a3ac7277a7158db7ff2d4696e32157ddec25e71a | |
parent | a94b116cae98fd7cd85b00ff781908c0dafd1780 (diff) | |
download | pkgsrc-14bbb2fd6ec0aa812b2aa99d58814ca503cdddd9.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.
-rw-r--r-- | x11/XmHTML/distinfo | 3 | ||||
-rw-r--r-- | x11/XmHTML/patches/patch-ai | 42 |
2 files changed, 44 insertions, 1 deletions
diff --git a/x11/XmHTML/distinfo b/x11/XmHTML/distinfo index 2c78d0b2524..2110dac85b1 100644 --- a/x11/XmHTML/distinfo +++ b/x11/XmHTML/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.7 2005/09/18 16:03:47 dmcmahill Exp $ +$NetBSD: distinfo,v 1.8 2005/10/03 17:52:10 joerg Exp $ SHA1 (XmHTML-1.1.7.tar.gz) = 4d8c82f88cf0700f6fc8898323d865b83d2a1ff1 RMD160 (XmHTML-1.1.7.tar.gz) = 0e5cf4a0d24fc73277186a726a3997dea4ea82db @@ -11,3 +11,4 @@ SHA1 (patch-ae) = 9fb001c2fc6a7fce4aaf638ea1168edcf4820998 SHA1 (patch-af) = 41d5a342cd13ad188289b115cbd3bfc36725b961 SHA1 (patch-ag) = 335c1139ee826ab8d04d8a7584d21675a3ae2d93 SHA1 (patch-ah) = 78ad8dc486da8aad6911f79eb8bd22d8417aec1f +SHA1 (patch-ai) = 300b35e24698d6e717f0b1bdfd577df91244fba4 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 : */ |