This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
Re: [tcl] Undefined NULL in tcl/compat/strstr.c
- From: Keith Seitz <keiths at redhat dot com>
- To: Masaki Muranaka <monaka at monami-software dot com>
- Cc: insight <insight at sourceware dot org>
- Date: Wed, 23 Apr 2008 11:03:49 -0700
- Subject: Re: [tcl] Undefined NULL in tcl/compat/strstr.c
- References: <EE8EE936-F2AD-41D0-9C29-5DB98D3AE80C@monami-software.com>
[Moving to correct list]
Masaki Muranaka wrote:
Hello,
This is obvious. Could anyone commit my patch?
2008-04-24 Masaki Muranaka <monaka@monami-software.com>
* compat/strstr.c : Add include stddef.h to get NULL define.
Having seen this patch, I took a peek at what the upstream Tcl group has
done. They've taken a slightly different tack, which I have committed:
tcl/ChangeLog
2008-04-23 Keith Seitz <keiths@redhat.com>
Based on patch from Masaki Muranaka <monaka@monami-software.com>:
* compat/strstr.c: Include tcl.h and define NULL if it is
not already defined.
Index: tcl/compat/strstr.c
===================================================================
RCS file: /cvs/src/src/tcl/compat/strstr.c,v
retrieving revision 1.5
diff -u -p -r1.5 strstr.c
--- tcl/compat/strstr.c 21 Jan 2003 19:39:57 -0000 1.5
+++ tcl/compat/strstr.c 23 Apr 2008 18:07:50 -0000
@@ -12,6 +12,11 @@
* RCS: @(#) $Id: strstr.c,v 1.3 2002/01/26 01:10:08 dgp Exp $
*/
+#include "tcl.h"
+#ifndef NULL
+#define NULL 0
+#endif
+
/*
*----------------------------------------------------------------------
*