diff options
author | Tim Janik <timj@gtk.org> | 1999-10-12 12:08:13 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1999-10-12 12:08:13 +0000 |
commit | 30a1e1addb131e3e200f91e9f93e3fc0709f3809 (patch) | |
tree | ba667ef80c93bc9da537f3a0bd7654f401b3c107 /configure.in | |
parent | acbe34e51a2903d50ee99cb46552c360905322ea (diff) | |
download | glib-30a1e1addb131e3e200f91e9f93e3fc0709f3809.tar.gz |
completly new implementation for printf string upper bounds calculation.
Tue Oct 12 12:16:12 1999 Tim Janik <timj@gtk.org>
* gmessages.c (g_printf_string_upper_bound): completly new implementation
for printf string upper bounds calculation.
we handle all glibc 2.1 format specifiers now, except for positional
parameters (%nn$...) and wide char strings, plus some obscure upper
case variants of the standard conversions. this fixes a lot of
bugs in the old code, i.e.
- NULL format strings
- floats with exponents >+24
- %G
- precision specifications in general
- negative field widths
- %p for SIZEOF_VOID_P > 4 platforms
we now issue warnigns in places where the old code would have
caused buffer overruns anyways. warnings are suppressed when invoked
from glogv(), to avoid infinite recursions if someone passes a log
message that comes with really obscure format specifications.
Tue Oct 12 11:49:00 1999 Tim Janik <timj@gtk.org>
* gstrfuncs.c: nuked old g_printf_string_upper_bound() version.
Tue Oct 12 03:34:40 1999 Tim Janik <timj@gtk.org>
* glib.h: added GFloatIEEE754 and GDoubleIEEE754 unions to access sign,
mantissa and exponent of IEEE floats and doubles (required by the new
version of g_printf_string_upper_bound). the unions are endian specific,
we handle G_LITTLE_ENDIAN and G_BIG_ENDIAN as of currently. ieee floats
and doubles are supported (used for storage) by at least intel, ppc and
sparc, reference:
http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html
Mon Oct 11 18:01:49 1999 Tim Janik <timj@gtk.org>
* configure.in: added additional checks to figure sizes of size_t,
ptrdiff_t and intmax_t (required by g_printf_string_upper_bound).
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 342657852..7b7a77b34 100644 --- a/configure.in +++ b/configure.in @@ -292,10 +292,10 @@ case x$glib_cv_hasinline in xyes) AC_DEFINE(G_HAVE_INLINE) esac -dnl for bytesex stuff +# check for bytesex stuff AC_C_BIGENDIAN -dnl header file checks +# xhexk for header files AC_CHECK_HEADERS(float.h, AC_DEFINE(HAVE_FLOAT_H)) AC_CHECK_HEADERS(limits.h, AC_DEFINE(HAVE_LIMITS_H)) AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H)) @@ -306,6 +306,29 @@ AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H)) AC_CHECK_HEADERS(sys/times.h, AC_DEFINE(HAVE_SYS_TIMES_H)) AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H)) AC_CHECK_HEADERS(values.h, AC_DEFINE(HAVE_VALUES_H)) +AC_CHECK_HEADERS(stdint.h, AC_DEFINE(HAVE_VALUES_H)) + +# check additional type sizes +size_includes=[" +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <ctype.h> +#include <string.h> +"] +if test "x$ac_cv_header_stdint_h" = "xyes"; then + size_includes=["$size_includes +#include <stdint.h> +"] +fi +if test "x$ac_cv_header_unistd_h" = "xyes"; then + size_includes=["$size_includes +#include <unistd.h> +"] +fi +GLIB_SIZEOF([$size_includes], size_t, size_t) +GLIB_SIZEOF([$size_includes], ptrdiff_t, ptrdiff_t) +GLIB_SIZEOF([$size_includes], intmax_t, intmax_t) # Check for some functions AC_CHECK_FUNCS(lstat strerror strsignal memmove vsnprintf strcasecmp strncasecmp poll) |