projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert modifications for Fedora compatibility due to stability problems.
[synfig.git]
/
ETL
/
trunk
/
ETL
/
_stringf.h
diff --git
a/ETL/trunk/ETL/_stringf.h
b/ETL/trunk/ETL/_stringf.h
index
22939a2
..
3d0c020
100644
(file)
--- a/
ETL/trunk/ETL/_stringf.h
+++ b/
ETL/trunk/ETL/_stringf.h
@@
-53,13
+53,6
@@
#define POPEN_BINARY_WRITE_TYPE "w"
#endif
#define POPEN_BINARY_WRITE_TYPE "w"
#endif
-#ifdef __ETL_HAS__VSNPRINTF
-#ifndef __ETL_HAS_VSNPRINTF
-#define vnsprintf _vnsprintf
-#define __ETL_HAS_VSNPRINTF
-#endif
-#endif
-
/* === T Y P E D E F S ===================================================== */
_ETL_BEGIN_CDECLS
/* === T Y P E D E F S ===================================================== */
_ETL_BEGIN_CDECLS
@@
-73,13
+66,13
@@
_ETL_BEGIN_CDECLS
// Prefer prototypes from glibc headers, since defining them ourselves
// works around glibc security mechanisms
// Prefer prototypes from glibc headers, since defining them ourselves
// works around glibc security mechanisms
-#ifdef
__ETL_HAS_VASPRINTF
// This is the preferred method
+#ifdef
HAVE_VASPRINTF
// This is the preferred method
#ifndef __GLIBC__
extern int vasprintf(char **,const char *,va_list)ETL_NO_THROW;
#endif
#else
#ifndef __GLIBC__
extern int vasprintf(char **,const char *,va_list)ETL_NO_THROW;
#endif
#else
-# ifdef
__ETL_HAS_VSNPRINTF
// This is the secondary method
+# ifdef
HAVE_VSNPRINTF
// This is the secondary method
#ifndef __GLIBC__
extern int vsnprintf(char *,size_t,const char*,va_list)ETL_NO_THROW;
#endif
#ifndef __GLIBC__
extern int vsnprintf(char *,size_t,const char*,va_list)ETL_NO_THROW;
#endif
@@
-87,13
+80,13
@@
_ETL_BEGIN_CDECLS
#endif
#endif
-#ifdef
__ETL_HAS
_VSSCANF
+#ifdef
HAVE
_VSSCANF
#ifndef __GLIBC__
extern int vsscanf(const char *,const char *,va_list)ETL_NO_THROW;
#endif
#else
#define ETL_NO_VSTRSCANF
#ifndef __GLIBC__
extern int vsscanf(const char *,const char *,va_list)ETL_NO_THROW;
#endif
#else
#define ETL_NO_VSTRSCANF
-#ifdef
__ETL_HAS
_SSCANF
+#ifdef
HAVE
_SSCANF
#ifndef __GLIBC__
extern int sscanf(const char *buf, const char *format, ...)ETL_NO_THROW;
#endif
#ifndef __GLIBC__
extern int sscanf(const char *buf, const char *format, ...)ETL_NO_THROW;
#endif
@@
-111,7
+104,7
@@
_ETL_BEGIN_NAMESPACE
inline std::string
vstrprintf(const char *format, va_list args)
{
inline std::string
vstrprintf(const char *format, va_list args)
{
-#ifdef
__ETL_HAS_VASPRINTF
// This is the preferred method (and safest)
+#ifdef
HAVE_VASPRINTF
// This is the preferred method (and safest)
char *buffer;
std::string ret;
int i=vasprintf(&buffer,format,args);
char *buffer;
std::string ret;
int i=vasprintf(&buffer,format,args);
@@
-122,7
+115,7
@@
vstrprintf(const char *format, va_list args)
}
return ret;
#else
}
return ret;
#else
-#ifdef
__ETL_HAS_VSNPRINTF
// This is the secondary method (Safe, but bulky)
+#ifdef
HAVE_VSNPRINTF
// This is the secondary method (Safe, but bulky)
#warning etl::vstrprintf() has a maximum size of ETL_STRPRINTF_MAX_LENGTH in this configuration.
#ifdef ETL_THREAD_SAFE
char buffer[ETL_STRPRINTF_MAX_LENGTH];
#warning etl::vstrprintf() has a maximum size of ETL_STRPRINTF_MAX_LENGTH in this configuration.
#ifdef ETL_THREAD_SAFE
char buffer[ETL_STRPRINTF_MAX_LENGTH];
@@
-171,7
+164,7
@@
strscanf(const std::string &data, const char*format, ...)
}
#else
}
#else
-#if defined (
__ETL_HAS
_SSCANF) && defined (__GNUC__)
+#if defined (
HAVE
_SSCANF) && defined (__GNUC__)
#define strscanf(data,format,...) sscanf(data.c_str(),format,__VA_ARGS__)
#endif
#endif
#define strscanf(data,format,...) sscanf(data.c_str(),format,__VA_ARGS__)
#endif
#endif