Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libsa The __strong_alias() seems to have to be in th...



details:   https://anonhg.NetBSD.org/src/rev/5416bf7f04d2
branches:  trunk
changeset: 551134:5416bf7f04d2
user:      dsl <dsl%NetBSD.org@localhost>
date:      Fri Aug 29 19:53:18 2003 +0000

description:
The __strong_alias() seems to have to be in the file with the definition.
So make bcmp.c define bcmp and memcmp.
This should (?) fix the atari build.
(I've now no idea why the previous change defined memcpy for the alpha build.)

diffstat:

 sys/lib/libsa/bcmp.c   |   5 ++++-
 sys/lib/libsa/memcmp.c |  15 +++------------
 2 files changed, 7 insertions(+), 13 deletions(-)

diffs (46 lines):

diff -r 010524816887 -r 5416bf7f04d2 sys/lib/libsa/bcmp.c
--- a/sys/lib/libsa/bcmp.c      Fri Aug 29 19:50:26 2003 +0000
+++ b/sys/lib/libsa/bcmp.c      Fri Aug 29 19:53:18 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcmp.c,v 1.4 2003/08/07 16:32:25 agc Exp $     */
+/*     $NetBSD: bcmp.c,v 1.5 2003/08/29 19:53:18 dsl Exp $     */
 
 /*
  * Copyright (c) 1987, 1993
@@ -33,6 +33,9 @@
 #include <lib/libkern/libkern.h>
 
 #undef bcmp                    /* in case of LIBSA_USE_MEMCMP */
+#undef memcmp
+
+__strong_alias(memcmp, bcmp)   /* libsa has always had an 'unsorting' memcmp */
 
 /*
  * bcmp -- vax cmpc3 instruction
diff -r 010524816887 -r 5416bf7f04d2 sys/lib/libsa/memcmp.c
--- a/sys/lib/libsa/memcmp.c    Fri Aug 29 19:50:26 2003 +0000
+++ b/sys/lib/libsa/memcmp.c    Fri Aug 29 19:53:18 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: memcmp.c,v 1.7 2003/08/27 22:53:18 dsl Exp $   */
+/*     $NetBSD: memcmp.c,v 1.8 2003/08/29 19:53:18 dsl Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -36,15 +36,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/types.h>
-#ifdef _STANDALONE
-#include <lib/libkern/libkern.h>
-#else
-#include <string.h>
-#endif
-#include "stand.h"
+/* memcmp is defined as equivalent to bcmp in bcmp.c */
 
-/*
- * Cheezy memcmp(), as a wrapper around bcmp()
- */
-__strong_alias(bcmp, memcmp)
+extern int i;          /* avoid any 'empty translation unit' problems' */



Home | Main Index | Thread Index | Old Index