about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--Rules2
-rw-r--r--string/bits/string2.h5
3 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index cdc16ba475..5d6598e3f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+1998-10-11  Ulrich Drepper  <drepper@cygnus.com>
+
+	* Rules [posix in sysdirs]: Set L_tmpnam to 20.
+	Patch by Zack Weinberg <zack@rabi.columbia.edu>.
+
+	* string/bits/string2.h [!_STRING_ARCH_unaligned]
+	(__mempcpy_small): Add parameter for 1 byte copy and use it.
+	Reported by Geoff Keating <geoffk@ozemail.com.au>.
+
 1998-10-09  Mark Kettenis  <kettenis@phys.uva.nl>
 
 	* sysdeps/mach/hurd/bits/posix_opt.h (_XBS5_ILP32_OFF32): Remove,
diff --git a/Rules b/Rules
index ab7c309d60..f44ae91323 100644
--- a/Rules
+++ b/Rules
@@ -209,7 +209,7 @@ TMP_MAX   = 0
 L_ctermid = 1
 L_cuserid = 1
 else
-L_tmpnam  = 19
+L_tmpnam  = 20
 TMP_MAX   = 238328
 L_ctermid = 9
 L_cuserid = 9
diff --git a/string/bits/string2.h b/string/bits/string2.h
index c47a73841a..eba4dc20df 100644
--- a/string/bits/string2.h
+++ b/string/bits/string2.h
@@ -173,6 +173,7 @@ __mempcpy_small (void *__dest1,
 }
 #  else
 #   define __mempcpy_args(src) \
+     ((__const char *) (src))[0],					      \
      __extension__ ((__STRING2_COPY_ARR2)				      \
       { { ((__const char *) (src))[0], ((__const char *) (src))[1] } }),      \
      __extension__ ((__STRING2_COPY_ARR3)				      \
@@ -200,7 +201,7 @@ __mempcpy_small (void *__dest1,
 	  ((__const char *) (src))[4], ((__const char *) (src))[5],	      \
 	  ((__const char *) (src))[6], ((__const char *) (src))[7] } })
 __STRING_INLINE void *
-__mempcpy_small (void *__dest1,
+__mempcpy_small (void *__dest1, char __src1,
 		 __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3,
 		 __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5,
 		 __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7,
@@ -210,7 +211,7 @@ __mempcpy_small (void *__dest1,
   switch (__srclen)
     {
     case 1:
-      *__dest = '\0';
+      *__dest = __src1;
       break;
     case 2:
       __extension__ *((__STRING2_COPY_ARR2 *) __dest) = __src2;