Source-Changes-HG archive

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

[src/trunk]: src/lib/csu/common_elf __syscall takes a quad_t as its first arg...



details:   https://anonhg.NetBSD.org/src/rev/40bf340da9f0
branches:  trunk
changeset: 494211:40bf340da9f0
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jul 03 23:01:01 2000 +0000

description:
__syscall takes a quad_t as its first argument, not an int.
_strrchr takes an int (due to promotion) as its third arg.
don't print the null byte at the end of string.
error messages should end with a linefeed.

diffstat:

 lib/csu/common_elf/common.c |  6 +++---
 lib/csu/common_elf/common.h |  8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (51 lines):

diff -r 7123fda1a221 -r 40bf340da9f0 lib/csu/common_elf/common.c
--- a/lib/csu/common_elf/common.c       Mon Jul 03 21:51:05 2000 +0000
+++ b/lib/csu/common_elf/common.c       Mon Jul 03 23:01:01 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: common.c,v 1.10 2000/06/16 20:52:49 christos Exp $ */
+/* $NetBSD: common.c,v 1.11 2000/07/03 23:01:01 matt Exp $ */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou
@@ -67,9 +67,9 @@
 {
 
        if ((obj == NULL) || (obj->magic != RTLD_MAGIC))
-               _FATAL("Corrupt Obj_Entry pointer in GOT");
+               _FATAL("Corrupt Obj_Entry pointer in GOT\n");
        if (obj->version != RTLD_VERSION)
-               _FATAL("Dynamic linker version mismatch");
+               _FATAL("Dynamic linker version mismatch\n");
 
        atexit(cleanup);
 }
diff -r 7123fda1a221 -r 40bf340da9f0 lib/csu/common_elf/common.h
--- a/lib/csu/common_elf/common.h       Mon Jul 03 21:51:05 2000 +0000
+++ b/lib/csu/common_elf/common.h       Mon Jul 03 23:01:01 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.6 2000/06/14 17:24:55 cgd Exp $ */
+/* $NetBSD: common.h,v 1.7 2000/07/03 23:01:01 matt Exp $ */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou
@@ -53,17 +53,17 @@
 typedef void Obj_Entry;
 #endif
 
-extern int     __syscall __P((int, ...));
+extern int     __syscall __P((quad_t, ...));
 #define        _exit(v)        __syscall(SYS_exit, (v))
 #define        write(fd, s, n) __syscall(SYS_write, (fd), (s), (n))
 
 #define        _FATAL(str)                             \
 do {                                           \
-       write(2, str, sizeof(str));             \
+       write(2, str, sizeof(str)-1);           \
        _exit(1);                               \
 } while (0)
 
-static char    *_strrchr __P((char *, char));
+static char    *_strrchr __P((char *, int));
 
 char   **environ;
 char   *__progname = "";



Home | Main Index | Thread Index | Old Index