mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com> Define g_alloca() as an
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com> * glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere. * gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
This commit is contained in:
parent
a212f93df2
commit
86ce799cdf
@ -1,3 +1,7 @@
|
|||||||
|
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
|
* glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere.
|
||||||
|
* gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
|
||||||
|
|
||||||
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
|
* glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere.
|
||||||
|
* gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
|
||||||
|
|
||||||
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
|
* glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere.
|
||||||
|
* gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
|
||||||
|
|
||||||
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
|
* glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere.
|
||||||
|
* gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
|
||||||
|
|
||||||
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
|
* glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere.
|
||||||
|
* gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
|
||||||
|
|
||||||
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
|
* glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere.
|
||||||
|
* gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
|
||||||
|
|
||||||
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
|
* glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere.
|
||||||
|
* gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
|
||||||
|
|
||||||
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
|
* glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere.
|
||||||
|
* gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
|
||||||
|
|
||||||
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
|
||||||
|
@ -72,7 +72,7 @@ AC_DEFINE_UNQUOTED(GLIB_INTERFACE_AGE, $GLIB_INTERFACE_AGE)
|
|||||||
AC_DEFINE_UNQUOTED(GLIB_BINARY_AGE, $GLIB_BINARY_AGE)
|
AC_DEFINE_UNQUOTED(GLIB_BINARY_AGE, $GLIB_BINARY_AGE)
|
||||||
|
|
||||||
dnl Initialize libtool
|
dnl Initialize libtool
|
||||||
AM_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
dnl Initialize maintainer mode
|
dnl Initialize maintainer mode
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
@ -221,6 +221,8 @@ AC_HEADER_STDC
|
|||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_FUNC_VPRINTF
|
AC_FUNC_VPRINTF
|
||||||
|
|
||||||
|
AC_FUNC_ALLOCA
|
||||||
|
|
||||||
AC_CHECK_FUNCS(atexit on_exit)
|
AC_CHECK_FUNCS(atexit on_exit)
|
||||||
|
|
||||||
AC_CHECK_SIZEOF(char)
|
AC_CHECK_SIZEOF(char)
|
||||||
@ -1178,6 +1180,9 @@ _______EOF
|
|||||||
if test x$g_mutex_header_file != x; then
|
if test x$g_mutex_header_file != x; then
|
||||||
echo '#include <'"$g_mutex_header_file"'>' >> $outfile
|
echo '#include <'"$g_mutex_header_file"'>' >> $outfile
|
||||||
fi
|
fi
|
||||||
|
if test "$glib_header_alloca_h" = "yes"; then
|
||||||
|
echo '#include <alloca.h>' >> $outfile
|
||||||
|
fi
|
||||||
if test x$glib_sys_poll_h = xyes; then
|
if test x$glib_sys_poll_h = xyes; then
|
||||||
echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
|
echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
|
||||||
fi
|
fi
|
||||||
@ -1391,6 +1396,8 @@ esac
|
|||||||
# on variable expansion in case labels. Look at the generated config.status
|
# on variable expansion in case labels. Look at the generated config.status
|
||||||
# for a hint.
|
# for a hint.
|
||||||
|
|
||||||
|
glib_header_alloca_h="$ac_cv_header_alloca_h"
|
||||||
|
|
||||||
case xyes in
|
case xyes in
|
||||||
x$ac_cv_header_float_h)
|
x$ac_cv_header_float_h)
|
||||||
glib_float_h=yes
|
glib_float_h=yes
|
||||||
|
@ -231,7 +231,7 @@ g_convert_with_fallback (const gchar *str,
|
|||||||
gchar *outp;
|
gchar *outp;
|
||||||
const gchar *insert_str = NULL;
|
const gchar *insert_str = NULL;
|
||||||
const gchar *p;
|
const gchar *p;
|
||||||
size_t inbytes_remaining;
|
int inbytes_remaining;
|
||||||
const gchar *save_p = NULL;
|
const gchar *save_p = NULL;
|
||||||
size_t save_inbytes = 0;
|
size_t save_inbytes = 0;
|
||||||
size_t outbytes_remaining;
|
size_t outbytes_remaining;
|
||||||
@ -301,7 +301,9 @@ g_convert_with_fallback (const gchar *str,
|
|||||||
|
|
||||||
while (!done && !have_error)
|
while (!done && !have_error)
|
||||||
{
|
{
|
||||||
err = iconv (cd, &p, &inbytes_remaining, &outp, &outbytes_remaining);
|
size_t inbytes_tmp = inbytes_remaining;
|
||||||
|
err = iconv (cd, &p, &inbytes_tmp, &outp, &outbytes_remaining);
|
||||||
|
inbytes_remaining = inbytes_tmp;
|
||||||
|
|
||||||
if (err == (size_t) -1)
|
if (err == (size_t) -1)
|
||||||
{
|
{
|
||||||
|
28
glib.h
28
glib.h
@ -325,6 +325,34 @@ extern "C" {
|
|||||||
# define G_BREAKPOINT() G_STMT_START{ raise (5 /* SIGTRAP */); }G_STMT_END
|
# define G_BREAKPOINT() G_STMT_START{ raise (5 /* SIGTRAP */); }G_STMT_END
|
||||||
#endif /* __i386__ */
|
#endif /* __i386__ */
|
||||||
|
|
||||||
|
/* g_alloca handling */
|
||||||
|
#ifdef GLIB_HAVE_ALLOCA_H
|
||||||
|
#include <alloca.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#ifdef __GNUC__
|
||||||
|
/* glibc already does this for us */
|
||||||
|
#ifndef alloca
|
||||||
|
# define alloca(size) __builtin_alloca (size)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
# ifdef _MSC_VER
|
||||||
|
# include <malloc.h>
|
||||||
|
# define alloca _alloca
|
||||||
|
# else
|
||||||
|
# ifdef _AIX
|
||||||
|
#pragma alloca
|
||||||
|
# else
|
||||||
|
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||||
|
char *alloca ();
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define g_alloca(size) alloca (size)
|
||||||
|
/* End g_alloca handling */
|
||||||
|
|
||||||
/* Provide macros for easily allocating memory. The macros
|
/* Provide macros for easily allocating memory. The macros
|
||||||
* will cast the allocated memory to the specified type
|
* will cast the allocated memory to the specified type
|
||||||
|
@ -231,7 +231,7 @@ g_convert_with_fallback (const gchar *str,
|
|||||||
gchar *outp;
|
gchar *outp;
|
||||||
const gchar *insert_str = NULL;
|
const gchar *insert_str = NULL;
|
||||||
const gchar *p;
|
const gchar *p;
|
||||||
size_t inbytes_remaining;
|
int inbytes_remaining;
|
||||||
const gchar *save_p = NULL;
|
const gchar *save_p = NULL;
|
||||||
size_t save_inbytes = 0;
|
size_t save_inbytes = 0;
|
||||||
size_t outbytes_remaining;
|
size_t outbytes_remaining;
|
||||||
@ -301,7 +301,9 @@ g_convert_with_fallback (const gchar *str,
|
|||||||
|
|
||||||
while (!done && !have_error)
|
while (!done && !have_error)
|
||||||
{
|
{
|
||||||
err = iconv (cd, &p, &inbytes_remaining, &outp, &outbytes_remaining);
|
size_t inbytes_tmp = inbytes_remaining;
|
||||||
|
err = iconv (cd, &p, &inbytes_tmp, &outp, &outbytes_remaining);
|
||||||
|
inbytes_remaining = inbytes_tmp;
|
||||||
|
|
||||||
if (err == (size_t) -1)
|
if (err == (size_t) -1)
|
||||||
{
|
{
|
||||||
|
28
glib/glib.h
28
glib/glib.h
@ -325,6 +325,34 @@ extern "C" {
|
|||||||
# define G_BREAKPOINT() G_STMT_START{ raise (5 /* SIGTRAP */); }G_STMT_END
|
# define G_BREAKPOINT() G_STMT_START{ raise (5 /* SIGTRAP */); }G_STMT_END
|
||||||
#endif /* __i386__ */
|
#endif /* __i386__ */
|
||||||
|
|
||||||
|
/* g_alloca handling */
|
||||||
|
#ifdef GLIB_HAVE_ALLOCA_H
|
||||||
|
#include <alloca.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#ifdef __GNUC__
|
||||||
|
/* glibc already does this for us */
|
||||||
|
#ifndef alloca
|
||||||
|
# define alloca(size) __builtin_alloca (size)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
# ifdef _MSC_VER
|
||||||
|
# include <malloc.h>
|
||||||
|
# define alloca _alloca
|
||||||
|
# else
|
||||||
|
# ifdef _AIX
|
||||||
|
#pragma alloca
|
||||||
|
# else
|
||||||
|
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||||
|
char *alloca ();
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define g_alloca(size) alloca (size)
|
||||||
|
/* End g_alloca handling */
|
||||||
|
|
||||||
/* Provide macros for easily allocating memory. The macros
|
/* Provide macros for easily allocating memory. The macros
|
||||||
* will cast the allocated memory to the specified type
|
* will cast the allocated memory to the specified type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user