]> Pileus Git - ~andy/gtk/commitdiff
- Added a g_memmove function for SunOS compatability.
authorOwen Taylor <otaylor@src.gnome.org>
Tue, 2 Dec 1997 21:03:14 +0000 (21:03 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 2 Dec 1997 21:03:14 +0000 (21:03 +0000)
- Disabled unused gldouble definitions which were a portability problem

                                        - owt

13 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/configure.in
glib/garray.c
glib/glib.h
glib/glibconfig.h.in
glib/gstring.c
gtk/gtktext.c

index d38fb3643440cc4a80f29fc12b22321efe625524..131f840a56e76eced2dad4dba2172a8d5e0a4119 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index d38fb3643440cc4a80f29fc12b22321efe625524..131f840a56e76eced2dad4dba2172a8d5e0a4119 100644 (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
index d38fb3643440cc4a80f29fc12b22321efe625524..131f840a56e76eced2dad4dba2172a8d5e0a4119 100644 (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
index d38fb3643440cc4a80f29fc12b22321efe625524..131f840a56e76eced2dad4dba2172a8d5e0a4119 100644 (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
index d38fb3643440cc4a80f29fc12b22321efe625524..131f840a56e76eced2dad4dba2172a8d5e0a4119 100644 (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
index d38fb3643440cc4a80f29fc12b22321efe625524..131f840a56e76eced2dad4dba2172a8d5e0a4119 100644 (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
index d38fb3643440cc4a80f29fc12b22321efe625524..131f840a56e76eced2dad4dba2172a8d5e0a4119 100644 (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
index b96aa7653c0479c3c85ffbd20d32c8ba10ef6df8..4820da628233787dff147badc141b284266bb8f7 100644 (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)
index 3700848439ad2739610f1f1640fa89d005b3f2d4..b3792256538aa7a3e3769653bc2bb52df3ac5a45 100644 (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;
index 68496c70fabffc3a8abebe1c6996e46fead91951..aa340672a9d16ab23ba0edf8c94d898ef09d3fe9 100644 (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
  */
index 7a7655952bbdea666ea3e1312354b8b324e09863..43c7d66072e466b72e0c4accfc5b3f2e217355c8 100644 (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
 
index 457d47ebcbb8d2479b2c357dcc727ed2f8b0f10d..eaadefd0ebb38464b133b41c1eef6110f15d992d 100644 (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;
 
index ae3dd4b5cffd96e56294784a27e0c9c2563bcbb9..93abccabfcf4a2d22ecaa89a16d87be32b7144f5 100644 (file)
@@ -1729,9 +1729,9 @@ move_gap_to_point (GtkText* text)
     {
       gint diff = text->point.index - text->gap_position;
 
-      memmove (text->text + text->gap_position,
-              text->text + text->gap_position + text->gap_size,
-              diff);
+      g_memmove (text->text + text->gap_position,
+                text->text + text->gap_position + text->gap_size,
+                diff);
 
       text->gap_position = text->point.index;
     }
@@ -1739,9 +1739,9 @@ move_gap_to_point (GtkText* text)
     {
       gint diff = text->gap_position - text->point.index;
 
-      memmove (text->text + text->point.index + text->gap_size,
-              text->text + text->point.index,
-              diff);
+      g_memmove (text->text + text->point.index + text->gap_size,
+                text->text + text->point.index,
+                diff);
 
       text->gap_position = text->point.index;
     }
@@ -1764,9 +1764,9 @@ 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,
-              text->text + text->gap_position + text->gap_size,
-              text->text_end - (text->gap_position + text->gap_size));
+      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));
 
       text->text_end += len*2;
       text->gap_size += len*2;