Emit declarations.
authorMartin Baulig <baulig@Stud.Informatik.uni-trier.de>
Wed, 15 Jul 1998 16:08:27 +0000 (16:08 +0000)
committerMartin Baulig <martin@src.gnome.org>
Wed, 15 Jul 1998 16:08:27 +0000 (16:08 +0000)
1998-07-15  Martin Baulig  <baulig@Stud.Informatik.uni-trier.de>

* gnomesupport-h.c (memmove strtod strtol strtoul): Emit
declarations.

* memmove.c: New file.  Imported from GNU libiberty.

* strtod.c, strtol.c, strtoul.c: New files. Imported from
GNU libiberty.

svn path=/trunk/; revision=279

support/ChangeLog
support/gnomesupport.awk
support/memmove.c

index b479610..e59681a 100644 (file)
@@ -1,3 +1,13 @@
+1998-07-15  Martin Baulig  <baulig@Stud.Informatik.uni-trier.de>
+
+       * gnomesupport-h.c (memmove strtod strtol strtoul): Emit
+       declarations.
+
+       * memmove.c: New file.  Imported from GNU libiberty.
+
+       * strtod.c, strtol.c, strtoul.c: New files. Imported from
+       GNU libiberty.
+
 1998-07-14  Raja R Harinath  <harinath@cs.umn.edu>
 
        * mkstemp.c (<stdint.h>): Systems that don't have `mkstemp'
index 96bec90..97a4272 100644 (file)
@@ -106,6 +106,37 @@ END {
     print "                 char **/*save_ptr*/);";
   }
 
+  if (!def["HAVE_STRTOD"]) {
+    print "";
+    print "/* Convert the initial portion of the string pointed to by";
+    print "   nptr to double representation and return the converted value.";
+    print "   If endptr is not NULL, a pointer to the character after the";
+    print "   last character used in the conversion is stored in the";
+    print "   location referenced by endptr. */";
+    print "double strtod (const char */*nptr*/, char **/*endptr*/);";
+  }
+
+  if (!def["HAVE_STRTOL"]) {
+    print "";
+    print "/* Convert the initial portion of the string pointed to by";
+    print "   nptr to a long integer value according to the given base.";
+    print "   If endptr is not NULL, a pointer to the character after the";
+    print "   last character used in the conversion is stored in the";
+    print "   location referenced by endptr. */";
+    print "long int strtol (const char */*nptr*/, char **/*endptr*/, int /*base*/);";
+  }
+
+  if (!def["HAVE_STRTOUL"]) {
+    print "";
+    print "/* Convert the initial portion of the string pointed to by";
+    print "   nptr to an unsigned long integer value according to the given base.";
+    print "   If endptr is not NULL, a pointer to the character after the";
+    print "   last character used in the conversion is stored in the";
+    print "   location referenced by endptr. */";
+    print "unsigned long int strtol (const char */*nptr*/, char **/*endptr*/,";
+    print "                          int /*base*/);";
+  }
+
   if (!def["HAVE_VASPRINTF"]) {
     print "";
     print "/* Write formatted output to a string dynamically allocated with";
@@ -123,7 +154,13 @@ END {
     print "int snprintf (char */*str*/, size_t /*maxlen*/,";
     print "              char */*fmt*/, ...);";
   }
-  
+
+  if (!def["HAVE_MEMMOVE"]) {
+    print "";
+    print "/* Copies len bytes from src to dest. */";
+    print "void * memmove (void */*dest*/, const void */*src*/, size_t /*len*/);";
+  }
+
   print "";
   print "#ifdef __cplusplus";
   print "}";
index 818fc24..96e257e 100644 (file)
@@ -1,16 +1,16 @@
 /* Wrapper to implement ANSI C's memmove using BSD's bcopy. */
 /* This function is in the public domain.  --Per Bothner. */
-#include <ansidecl.h>
+
 #ifdef __STDC__
 #include <stddef.h>
 #else
 #define size_t unsigned long
 #endif
 
-PTR
+void *
 memmove (s1, s2, n)
-     PTR s1;
-     CONST PTR s2;
+     void *s1;
+     const void *s2;
      size_t n;
 {
   bcopy (s2, s1, n);