Revision: 2373
http://synfig.svn.sourceforge.net/synfig/?rev=2373&view=rev
Author: pabs3
Date: 2009-05-06 05:03:23 +0000 (Wed, 06 May 2009)
Log Message:
-----------
Prefer prototypes from glibc headers, since defining them ourselves works
around glibc security mechanisms.
Modified Paths:
--------------
ETL/trunk/ETL/_stringf.h
Modified: ETL/trunk/ETL/_stringf.h
===================================================================
--- ETL/trunk/ETL/_stringf.h 2009-05-06 04:48:12 UTC (rev 2372)
+++ ETL/trunk/ETL/_stringf.h 2009-05-06 05:03:23 UTC (rev 2373)
@@ -30,9 +30,14 @@
/* === H E A D E R S ======================================================= */
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include <string>
#include <cstdarg>
#include <cstdlib>
+#include <cstdio>
/* === M A C R O S ========================================================= */
@@ -58,22 +63,33 @@
#define ETL_NO_THROW throw()
#endif
+// Prefer prototypes from glibc headers, since defining them ourselves
+// works around glibc security mechanisms
+
#ifdef HAVE_VASPRINTF // This is the preferred method
- extern int vasprintf(char **,const char *,va_list)ETL_NO_THROW;
+ #ifndef __GLIBC__
+ extern int vasprintf(char **,const char *,va_list)ETL_NO_THROW;
+ #endif
#else
# ifdef HAVE_VSNPRINTF // This is the secondary method
- extern int vsnprintf(char *,size_t,const char*,va_list)ETL_NO_THROW;
+ #ifndef __GLIBC__
+ extern int vsnprintf(char *,size_t,const char*,va_list)ETL_NO_THROW;
+ #endif
# endif
#endif
#ifdef HAVE_VSSCANF
-extern int vsscanf(const char *,const char *,va_list)ETL_NO_THROW;
+ #ifndef __GLIBC__
+ extern int vsscanf(const char *,const char *,va_list)ETL_NO_THROW;
+ #endif
#else
#define ETL_NO_VSTRSCANF
#ifdef HAVE_SSCANF
-extern int sscanf(const char *buf, const char *format, ...)ETL_NO_THROW;
+ #ifndef __GLIBC__
+ extern int sscanf(const char *buf, const char *format, ...)ETL_NO_THROW;
+ #endif
#endif
#endif
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl