mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 03:02:10 +01:00
Use C99 varargs macros where possible (check __STDC_VERSION__), otherwise,
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com> * glib.h: Use C99 varargs macros where possible (check __STDC_VERSION__), otherwise, on gcc, use an alternate form of gcc varargs which is more likely to be supported going forward. (Based on some code from Raja Harinath)
This commit is contained in:
parent
49dd5d8236
commit
182b22c754
@ -1,3 +1,11 @@
|
|||||||
|
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h: Use C99 varargs macros where possible
|
||||||
|
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
|
||||||
|
form of gcc varargs which is more likely
|
||||||
|
to be supported going forward. (Based on some code
|
||||||
|
from Raja Harinath)
|
||||||
|
|
||||||
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h: Backport correct descriptive comment from
|
* glib.h: Backport correct descriptive comment from
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h: Use C99 varargs macros where possible
|
||||||
|
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
|
||||||
|
form of gcc varargs which is more likely
|
||||||
|
to be supported going forward. (Based on some code
|
||||||
|
from Raja Harinath)
|
||||||
|
|
||||||
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h: Backport correct descriptive comment from
|
* glib.h: Backport correct descriptive comment from
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h: Use C99 varargs macros where possible
|
||||||
|
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
|
||||||
|
form of gcc varargs which is more likely
|
||||||
|
to be supported going forward. (Based on some code
|
||||||
|
from Raja Harinath)
|
||||||
|
|
||||||
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h: Backport correct descriptive comment from
|
* glib.h: Backport correct descriptive comment from
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h: Use C99 varargs macros where possible
|
||||||
|
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
|
||||||
|
form of gcc varargs which is more likely
|
||||||
|
to be supported going forward. (Based on some code
|
||||||
|
from Raja Harinath)
|
||||||
|
|
||||||
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h: Backport correct descriptive comment from
|
* glib.h: Backport correct descriptive comment from
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h: Use C99 varargs macros where possible
|
||||||
|
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
|
||||||
|
form of gcc varargs which is more likely
|
||||||
|
to be supported going forward. (Based on some code
|
||||||
|
from Raja Harinath)
|
||||||
|
|
||||||
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h: Backport correct descriptive comment from
|
* glib.h: Backport correct descriptive comment from
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h: Use C99 varargs macros where possible
|
||||||
|
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
|
||||||
|
form of gcc varargs which is more likely
|
||||||
|
to be supported going forward. (Based on some code
|
||||||
|
from Raja Harinath)
|
||||||
|
|
||||||
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h: Backport correct descriptive comment from
|
* glib.h: Backport correct descriptive comment from
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h: Use C99 varargs macros where possible
|
||||||
|
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
|
||||||
|
form of gcc varargs which is more likely
|
||||||
|
to be supported going forward. (Based on some code
|
||||||
|
from Raja Harinath)
|
||||||
|
|
||||||
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h: Backport correct descriptive comment from
|
* glib.h: Backport correct descriptive comment from
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h: Use C99 varargs macros where possible
|
||||||
|
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
|
||||||
|
form of gcc varargs which is more likely
|
||||||
|
to be supported going forward. (Based on some code
|
||||||
|
from Raja Harinath)
|
||||||
|
|
||||||
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
Wed Aug 9 14:12:03 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h: Backport correct descriptive comment from
|
* glib.h: Backport correct descriptive comment from
|
||||||
|
30
glib.h
30
glib.h
@ -1291,16 +1291,32 @@ GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask);
|
|||||||
#ifndef G_LOG_DOMAIN
|
#ifndef G_LOG_DOMAIN
|
||||||
#define G_LOG_DOMAIN ((gchar*) 0)
|
#define G_LOG_DOMAIN ((gchar*) 0)
|
||||||
#endif /* G_LOG_DOMAIN */
|
#endif /* G_LOG_DOMAIN */
|
||||||
#ifdef __GNUC__
|
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||||
#define g_error(format, args...) g_log (G_LOG_DOMAIN, \
|
#define g_error(...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_ERROR, \
|
G_LOG_LEVEL_ERROR, \
|
||||||
format, ##args)
|
__VA_ARGS__)
|
||||||
#define g_message(format, args...) g_log (G_LOG_DOMAIN, \
|
#define g_message(...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_MESSAGE, \
|
G_LOG_LEVEL_MESSAGE, \
|
||||||
format, ##args)
|
__VA_ARGS__)
|
||||||
#define g_warning(format, args...) g_log (G_LOG_DOMAIN, \
|
#define g_critical(...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
__VA_ARGS__)
|
||||||
|
#define g_warning(...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_WARNING, \
|
G_LOG_LEVEL_WARNING, \
|
||||||
format, ##args)
|
__VA_ARGS__)
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
#define g_error(format...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_ERROR, \
|
||||||
|
format)
|
||||||
|
#define g_message(format...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_MESSAGE, \
|
||||||
|
format)
|
||||||
|
#define g_critical(format...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
format)
|
||||||
|
#define g_warning(format...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_WARNING, \
|
||||||
|
format)
|
||||||
#else /* !__GNUC__ */
|
#else /* !__GNUC__ */
|
||||||
static void
|
static void
|
||||||
g_error (const gchar *format,
|
g_error (const gchar *format,
|
||||||
|
30
glib/glib.h
30
glib/glib.h
@ -1291,16 +1291,32 @@ GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask);
|
|||||||
#ifndef G_LOG_DOMAIN
|
#ifndef G_LOG_DOMAIN
|
||||||
#define G_LOG_DOMAIN ((gchar*) 0)
|
#define G_LOG_DOMAIN ((gchar*) 0)
|
||||||
#endif /* G_LOG_DOMAIN */
|
#endif /* G_LOG_DOMAIN */
|
||||||
#ifdef __GNUC__
|
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||||
#define g_error(format, args...) g_log (G_LOG_DOMAIN, \
|
#define g_error(...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_ERROR, \
|
G_LOG_LEVEL_ERROR, \
|
||||||
format, ##args)
|
__VA_ARGS__)
|
||||||
#define g_message(format, args...) g_log (G_LOG_DOMAIN, \
|
#define g_message(...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_MESSAGE, \
|
G_LOG_LEVEL_MESSAGE, \
|
||||||
format, ##args)
|
__VA_ARGS__)
|
||||||
#define g_warning(format, args...) g_log (G_LOG_DOMAIN, \
|
#define g_critical(...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
__VA_ARGS__)
|
||||||
|
#define g_warning(...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_WARNING, \
|
G_LOG_LEVEL_WARNING, \
|
||||||
format, ##args)
|
__VA_ARGS__)
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
#define g_error(format...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_ERROR, \
|
||||||
|
format)
|
||||||
|
#define g_message(format...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_MESSAGE, \
|
||||||
|
format)
|
||||||
|
#define g_critical(format...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
format)
|
||||||
|
#define g_warning(format...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_WARNING, \
|
||||||
|
format)
|
||||||
#else /* !__GNUC__ */
|
#else /* !__GNUC__ */
|
||||||
static void
|
static void
|
||||||
g_error (const gchar *format,
|
g_error (const gchar *format,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user