From 28548017444804a9b16ab521673a2767ed9fbc38 Mon Sep 17 00:00:00 2001 From: Marc Lehmann Date: Thu, 26 Aug 1999 20:42:43 +0000 Subject: [PATCH] see plug-ins/perl/Changes --- plug-ins/perl/Changes | 2 ++ plug-ins/perl/Gimp/Lib.xs | 32 +++----------------------------- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/plug-ins/perl/Changes b/plug-ins/perl/Changes index 96da5927da..0d3de15ecb 100644 --- a/plug-ins/perl/Changes +++ b/plug-ins/perl/Changes @@ -1,5 +1,7 @@ Revision history for Gimp-Perl extension. + - removed some glib-1.1 compatibility cruft. + 1.12 Tue Aug 24 19:30:29 CEST 1999 - do not emit warning for function names prefixed with "+". - removed non-c89 ansi'isms from Lib.xs. diff --git a/plug-ins/perl/Gimp/Lib.xs b/plug-ins/perl/Gimp/Lib.xs index 1a139e649e..b894890f74 100644 --- a/plug-ins/perl/Gimp/Lib.xs +++ b/plug-ins/perl/Gimp/Lib.xs @@ -332,8 +332,7 @@ trace_init () #ifndef __STDC__ #error You need to compile with an ansi-c compiler!!! -#error Compilation will continue at your own risk!! -#define __STDC_VERSION__ 0 +#error Remove these lines to continue at your own risk! #endif #if __STDC_VERSION__ > 199900 @@ -367,31 +366,6 @@ static void trace_printf (char *frmt, ...) else sv_catpv (trace_var, buffer); } -#else -error need_ansi_compiler__maybe_try_c89 -#endif - -/* in case g_strdup_printf is missing. */ -#if (GLIB_MAJOR_VERSION>1) || (GLIB_MAJOR_VERSION==1 && GLIB_MINOR_VERSION>1) -#define strdup_printf g_strdup_printf -#elif defined(__STDC__) -#include -static char * -strdup_printf (char *frmt, ...) -{ - va_list args; - char buffer[MAX_STRING]; /* sorry... */ - - va_start (args, frmt); -#ifdef HAVE_VSNPRINTF - vsnprintf (buffer, sizeof buffer, frmt, args); -#else - vsprintf (buffer, frmt, args); -#endif - return g_strdup (buffer); -} -#else -error need_ansi_compiler__maybe_try_c89 #endif static int @@ -1250,7 +1224,7 @@ static void pii_run(char *name, int nparams, GParam *param, int *xnreturn_vals, } if (count && !err_msg) - err_msg = strdup_printf ("plug-in returned %d more values than expected", count); + err_msg = g_strdup_printf ("plug-in returned %d more values than expected", count); } while (count--) @@ -1263,7 +1237,7 @@ static void pii_run(char *name, int nparams, GParam *param, int *xnreturn_vals, LEAVE; } else - err_msg = strdup_printf ("being called as '%s', but '%s' not registered in the pdb", name, name); + err_msg = g_strdup_printf ("being called as '%s', but '%s' not registered in the pdb", name, name); if (err_msg) {