- Added a g_memmove function for SunOS compatability.

- Disabled unused gldouble definitions which were a portability problem

                                        - owt
This commit is contained in:
Owen Taylor 1997-12-02 21:03:14 +00:00
parent a95ad0a897
commit 8fc5d3586a
13 changed files with 123 additions and 16 deletions

View File

@ -1,3 +1,16 @@
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in. Disabled gldouble, since
it wasn't used anywhere and caused portability problems
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a
g_memmove function which is simply memmove if it exists, otherwise
bcopy.(Should really check if bcopy has the correct semantics, and
create our own memmove is necessary)
* glib/gstring.c, glib/garray.c, gtk/gtktext.c:
memmove => g_memmove
Sun Nov 30 1997 Jay Painter <jpaint@serv.net>
* gtk/gtknotebook.c: fixed a old bug where all the notebook pages
which were not displayed when the notebook widget was realized were

View File

@ -1,3 +1,16 @@
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in. Disabled gldouble, since
it wasn't used anywhere and caused portability problems
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a
g_memmove function which is simply memmove if it exists, otherwise
bcopy.(Should really check if bcopy has the correct semantics, and
create our own memmove is necessary)
* glib/gstring.c, glib/garray.c, gtk/gtktext.c:
memmove => g_memmove
Sun Nov 30 1997 Jay Painter <jpaint@serv.net>
* gtk/gtknotebook.c: fixed a old bug where all the notebook pages
which were not displayed when the notebook widget was realized were

View File

@ -1,3 +1,16 @@
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in. Disabled gldouble, since
it wasn't used anywhere and caused portability problems
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a
g_memmove function which is simply memmove if it exists, otherwise
bcopy.(Should really check if bcopy has the correct semantics, and
create our own memmove is necessary)
* glib/gstring.c, glib/garray.c, gtk/gtktext.c:
memmove => g_memmove
Sun Nov 30 1997 Jay Painter <jpaint@serv.net>
* gtk/gtknotebook.c: fixed a old bug where all the notebook pages
which were not displayed when the notebook widget was realized were

View File

@ -1,3 +1,16 @@
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in. Disabled gldouble, since
it wasn't used anywhere and caused portability problems
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a
g_memmove function which is simply memmove if it exists, otherwise
bcopy.(Should really check if bcopy has the correct semantics, and
create our own memmove is necessary)
* glib/gstring.c, glib/garray.c, gtk/gtktext.c:
memmove => g_memmove
Sun Nov 30 1997 Jay Painter <jpaint@serv.net>
* gtk/gtknotebook.c: fixed a old bug where all the notebook pages
which were not displayed when the notebook widget was realized were

View File

@ -1,3 +1,16 @@
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in. Disabled gldouble, since
it wasn't used anywhere and caused portability problems
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a
g_memmove function which is simply memmove if it exists, otherwise
bcopy.(Should really check if bcopy has the correct semantics, and
create our own memmove is necessary)
* glib/gstring.c, glib/garray.c, gtk/gtktext.c:
memmove => g_memmove
Sun Nov 30 1997 Jay Painter <jpaint@serv.net>
* gtk/gtknotebook.c: fixed a old bug where all the notebook pages
which were not displayed when the notebook widget was realized were

View File

@ -1,3 +1,16 @@
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in. Disabled gldouble, since
it wasn't used anywhere and caused portability problems
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a
g_memmove function which is simply memmove if it exists, otherwise
bcopy.(Should really check if bcopy has the correct semantics, and
create our own memmove is necessary)
* glib/gstring.c, glib/garray.c, gtk/gtktext.c:
memmove => g_memmove
Sun Nov 30 1997 Jay Painter <jpaint@serv.net>
* gtk/gtknotebook.c: fixed a old bug where all the notebook pages
which were not displayed when the notebook widget was realized were

View File

@ -1,3 +1,16 @@
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in. Disabled gldouble, since
it wasn't used anywhere and caused portability problems
Tue Dec 1 1997 Owen Taylor <owt1@cornell.edu>
* glib/glib.h, glib/configure.in, glib/glibconfig.h.in: Added a
g_memmove function which is simply memmove if it exists, otherwise
bcopy.(Should really check if bcopy has the correct semantics, and
create our own memmove is necessary)
* glib/gstring.c, glib/garray.c, gtk/gtktext.c:
memmove => g_memmove
Sun Nov 30 1997 Jay Painter <jpaint@serv.net>
* gtk/gtknotebook.c: fixed a old bug where all the notebook pages
which were not displayed when the notebook widget was realized were

View File

@ -63,7 +63,8 @@ AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(void *)
AC_C_LONG_DOUBLE
# long doubles were not used, and a portability problem
# AC_C_LONG_DOUBLE
AC_C_CONST
AC_C_INLINE
@ -71,8 +72,8 @@ AC_CHECK_HEADERS(float.h, AC_DEFINE(HAVE_FLOAT_H))
AC_CHECK_HEADERS(limits.h, AC_DEFINE(HAVE_LIMITS_H))
AC_CHECK_HEADERS(values.h, AC_DEFINE(HAVE_VALUES_H))
# Check for strerror and strsignal functions
AC_CHECK_FUNCS(strerror strsignal)
# Check for strerror, strsignal, and memmove functions
AC_CHECK_FUNCS(strerror strsignal memmove)
# Check for sys_errlist
AC_MSG_CHECKING(sys_errlist)

View File

@ -92,7 +92,7 @@ g_rarray_prepend (GArray *array,
{
g_array_maybe_expand ((GRealArray*) array, size);
memmove (array->data + size, array->data, array->len);
g_memmove (array->data + size, array->data, array->len);
memcpy (array->data, data, size);
array->len += size;

View File

@ -257,11 +257,16 @@ typedef unsigned int guint;
typedef float gfloat;
typedef double gdouble;
/* HAVE_LONG_DOUBLE doesn't work correctly on all platforms.
* Since gldouble isn't used anywhere, just disable it for now */
#if 0
#ifdef HAVE_LONG_DOUBLE
typedef long double gldouble;
#else /* HAVE_LONG_DOUBLE */
typedef double gldouble;
#endif /* HAVE_LONG_DOUBLE */
#endif /* 0 */
typedef void* gpointer;
@ -588,6 +593,14 @@ gchar* g_strdup (const gchar *str);
gchar* g_strerror (gint errnum);
gchar* g_strsignal (gint signum);
/* We make the assumption that if memmove isn't available, then
* bcopy will do the job. This isn't safe everywhere. (bcopy can't
* necessarily handle overlapping copies) */
#ifdef HAVE_MEMMOVE
#define g_memmove memmove
#else
#define g_memmove(a,b,c) bcopy(b,a,c)
#endif
/* Errors
*/

View File

@ -22,7 +22,6 @@
#undef HAVE_DOPRNT
#undef HAVE_FLOAT_H
#undef HAVE_LIMITS_H
#undef HAVE_LONG_DOUBLE
#undef HAVE_SYS_SELECT_H
#undef HAVE_STRERROR
#undef HAVE_STRSIGNAL
@ -57,6 +56,9 @@
/* Define if you have the strsignal function. */
#undef HAVE_STRSIGNAL
/* Define if you have the memmove function */
#undef HAVE_MEMMOVE
/* Define if you have the <float.h> header file. */
#undef HAVE_FLOAT_H

View File

@ -286,7 +286,7 @@ g_string_prepend (GString *fstring, gchar *val)
g_string_maybe_expand (string, len);
memmove (string->str, string->str + len, string->len);
g_memmove (string->str, string->str + len, string->len);
strncpy (string->str, val, len);
@ -304,7 +304,7 @@ g_string_prepend_c (GString *fstring, char c)
g_string_maybe_expand (string, 1);
memmove (string->str, string->str + 1, string->len);
g_memmove (string->str, string->str + 1, string->len);
string->str[0] = c;

View File

@ -1729,7 +1729,7 @@ move_gap_to_point (GtkText* text)
{
gint diff = text->point.index - text->gap_position;
memmove (text->text + text->gap_position,
g_memmove (text->text + text->gap_position,
text->text + text->gap_position + text->gap_size,
diff);
@ -1739,7 +1739,7 @@ move_gap_to_point (GtkText* text)
{
gint diff = text->gap_position - text->point.index;
memmove (text->text + text->point.index + text->gap_size,
g_memmove (text->text + text->point.index + text->gap_size,
text->text + text->point.index,
diff);
@ -1764,7 +1764,7 @@ make_forward_space (GtkText* text, guint len)
text->text = (guchar*)g_realloc(text->text, i);
}
memmove (text->text + text->gap_position + text->gap_size + 2*len,
g_memmove (text->text + text->gap_position + text->gap_size + 2*len,
text->text + text->gap_position + text->gap_size,
text->text_end - (text->gap_position + text->gap_size));