From efd37a7da871173959269e9b17305184a70a7a60 Mon Sep 17 00:00:00 2001 From: thorpej Date: Wed, 2 Dec 1998 19:29:56 +0000 Subject: [PATCH] Warn about references to the compatibility vfork() (i.e. the vfork() with the 4.4BSD non-shared-address-space semantics), and direct the user to include to generate the correct reference. This warning isn't about an ABI compatibility issue, but the new vfork() is considerably faster. --- lib/libc/arch/alpha/sys/Ovfork.S | 5 ++++- lib/libc/arch/arm32/sys/Ovfork.S | 5 ++++- lib/libc/arch/i386/sys/Ovfork.S | 7 +++++-- lib/libc/arch/m68k/sys/Ovfork.S | 7 +++++-- lib/libc/arch/mips/sys/Ovfork.S | 7 +++++-- lib/libc/arch/ns32k/sys/Ovfork.S | 7 +++++-- lib/libc/arch/powerpc/sys/Ovfork.S | 5 ++++- lib/libc/arch/sparc/sys/Ovfork.S | 7 +++++-- lib/libc/arch/sparc64/sys/Ovfork.S | 7 +++++-- lib/libc/arch/vax/sys/Ovfork.S | 5 ++++- 10 files changed, 46 insertions(+), 16 deletions(-) diff --git a/lib/libc/arch/alpha/sys/Ovfork.S b/lib/libc/arch/alpha/sys/Ovfork.S index aaec3bf5710e..bec4b02e6e36 100644 --- a/lib/libc/arch/alpha/sys/Ovfork.S +++ b/lib/libc/arch/alpha/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $NetBSD: Ovfork.S,v 1.1 1995/02/10 17:50:29 cgd Exp $ */ +/* $NetBSD: Ovfork.S,v 1.2 1998/12/02 19:29:56 thorpej Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -29,6 +29,9 @@ #include "SYS.h" +WARN_REFERENCES(vfork, \ + "warning: reference to compatibility vfork(); include for correct reference") + SYSCALL(vfork) cmovne a4, zero, v0 /* a4 (rv[1]) != 0, child */ RET diff --git a/lib/libc/arch/arm32/sys/Ovfork.S b/lib/libc/arch/arm32/sys/Ovfork.S index 89f7debc2d49..d5341685d0c6 100644 --- a/lib/libc/arch/arm32/sys/Ovfork.S +++ b/lib/libc/arch/arm32/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $NetBSD: Ovfork.S,v 1.3 1997/10/06 00:07:09 mark Exp $ */ +/* $NetBSD: Ovfork.S,v 1.4 1998/12/02 19:29:56 thorpej Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -37,6 +37,9 @@ #include "SYS.h" +WARN_REFERENCES(vfork, \ + "warning: reference to compatibility vfork(); include for correct reference") + /* * pid = vfork(); */ diff --git a/lib/libc/arch/i386/sys/Ovfork.S b/lib/libc/arch/i386/sys/Ovfork.S index af9d1c603937..5be59dd469b1 100644 --- a/lib/libc/arch/i386/sys/Ovfork.S +++ b/lib/libc/arch/i386/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $NetBSD: Ovfork.S,v 1.11 1998/10/01 19:25:05 kleink Exp $ */ +/* $NetBSD: Ovfork.S,v 1.12 1998/12/02 19:29:56 thorpej Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -40,7 +40,7 @@ #include #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: Ovfork.S,v 1.11 1998/10/01 19:25:05 kleink Exp $") + RCSID("$NetBSD: Ovfork.S,v 1.12 1998/12/02 19:29:56 thorpej Exp $") #endif /* SYSLIBC_SCCS and not lint */ #include "SYS.h" @@ -51,6 +51,9 @@ .globl _C_LABEL(errno) #endif +WARN_REFERENCES(vfork, \ + "warning: reference to compatibility vfork(); include for correct reference") + /* * pid = vfork(); * diff --git a/lib/libc/arch/m68k/sys/Ovfork.S b/lib/libc/arch/m68k/sys/Ovfork.S index 8ac86412fd18..f776687320f0 100644 --- a/lib/libc/arch/m68k/sys/Ovfork.S +++ b/lib/libc/arch/m68k/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $NetBSD: Ovfork.S,v 1.7 1998/10/06 19:05:26 kleink Exp $ */ +/* $NetBSD: Ovfork.S,v 1.8 1998/12/02 19:29:57 thorpej Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -43,7 +43,7 @@ #if 0 RCSID("from: @(#)Ovfork.s 5.1 (Berkeley) 5/12/90") #else - RCSID("$NetBSD: Ovfork.S,v 1.7 1998/10/06 19:05:26 kleink Exp $") + RCSID("$NetBSD: Ovfork.S,v 1.8 1998/12/02 19:29:57 thorpej Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -52,6 +52,9 @@ * C library -- vfork */ +WARN_REFERENCES(vfork, \ + "warning: reference to compatibility vfork(); include for correct reference") + /* * pid = vfork(); * diff --git a/lib/libc/arch/mips/sys/Ovfork.S b/lib/libc/arch/mips/sys/Ovfork.S index 996b30011ef3..23381b44c710 100644 --- a/lib/libc/arch/mips/sys/Ovfork.S +++ b/lib/libc/arch/mips/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $NetBSD: Ovfork.S,v 1.5 1996/09/17 01:32:39 jonathan Exp $ */ +/* $NetBSD: Ovfork.S,v 1.6 1998/12/02 19:29:57 thorpej Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -40,13 +40,16 @@ #if defined(LIBC_SCCS) && !defined(lint) ASMSTR("from: @(#)Ovfork.s 8.1 (Berkeley) 6/4/93") - ASMSTR("$NetBSD: Ovfork.S,v 1.5 1996/09/17 01:32:39 jonathan Exp $") + ASMSTR("$NetBSD: Ovfork.S,v 1.6 1998/12/02 19:29:57 thorpej Exp $") #endif /* LIBC_SCCS and not lint */ #ifdef ABICALLS .abicalls #endif +WARN_REFERENCES(vfork, \ + "warning: reference to compatibility vfork(); include for correct reference") + /* * pid = vfork(); * diff --git a/lib/libc/arch/ns32k/sys/Ovfork.S b/lib/libc/arch/ns32k/sys/Ovfork.S index c9c4b65377d0..ebb8461f0bd6 100644 --- a/lib/libc/arch/ns32k/sys/Ovfork.S +++ b/lib/libc/arch/ns32k/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $NetBSD: Ovfork.S,v 1.3 1997/05/08 13:39:01 matthias Exp $ */ +/* $NetBSD: Ovfork.S,v 1.4 1998/12/02 19:29:57 thorpej Exp $ */ /* * Copyright (c) 1992 Helsinki University of Technology @@ -24,9 +24,12 @@ #include "SYS.h" #if defined(LIBC_SCCS) - RCSID("$NetBSD: Ovfork.S,v 1.3 1997/05/08 13:39:01 matthias Exp $") + RCSID("$NetBSD: Ovfork.S,v 1.4 1998/12/02 19:29:57 thorpej Exp $") #endif +WARN_REFERENCES(vfork, \ + "warning: reference to compatibility vfork(); include for correct reference") + /* * r0 = pid of child in parent / pid of parent in child * r1 = 0 in parent, 1 in child diff --git a/lib/libc/arch/powerpc/sys/Ovfork.S b/lib/libc/arch/powerpc/sys/Ovfork.S index e49b85c0a579..fa95fa23d0fa 100644 --- a/lib/libc/arch/powerpc/sys/Ovfork.S +++ b/lib/libc/arch/powerpc/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $NetBSD: Ovfork.S,v 1.2 1998/05/25 15:28:02 ws Exp $ */ +/* $NetBSD: Ovfork.S,v 1.3 1998/12/02 19:29:57 thorpej Exp $ */ /* * pid = vfork(); @@ -9,6 +9,9 @@ #include "SYS.h" +WARN_REFERENCES(vfork, \ + "warning: reference to compatibility vfork(); include for correct reference") + SYSCALL(vfork) addi 4,4,-1 # from 1 to 0 in child, 0 to -1 in parent and 3,3,4 # return 0 in child, pid in parent diff --git a/lib/libc/arch/sparc/sys/Ovfork.S b/lib/libc/arch/sparc/sys/Ovfork.S index 4e50282c3888..e44aec8d0c80 100644 --- a/lib/libc/arch/sparc/sys/Ovfork.S +++ b/lib/libc/arch/sparc/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $NetBSD: Ovfork.S,v 1.2 1997/07/16 14:37:53 christos Exp $ */ +/* $NetBSD: Ovfork.S,v 1.3 1998/12/02 19:29:57 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -44,7 +44,7 @@ #if 0 .asciz "@(#)Ovfork.s 8.1 (Berkeley) 6/4/93" #else - RCSID("$NetBSD: Ovfork.S,v 1.2 1997/07/16 14:37:53 christos Exp $") + RCSID("$NetBSD: Ovfork.S,v 1.3 1998/12/02 19:29:57 thorpej Exp $") #endif #endif /* SYSLIBC_SCCS and not lint */ @@ -57,6 +57,9 @@ #include "SYS.h" +WARN_REFERENCES(vfork, \ + "warning: reference to compatibility vfork(); include for correct reference") + SYSCALL(vfork) dec %o1 ! from 1 to 0 in child, 0 to -1 in parent retl diff --git a/lib/libc/arch/sparc64/sys/Ovfork.S b/lib/libc/arch/sparc64/sys/Ovfork.S index 140db3ee8cb1..4ab2103787d4 100644 --- a/lib/libc/arch/sparc64/sys/Ovfork.S +++ b/lib/libc/arch/sparc64/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $NetBSD: Ovfork.S,v 1.1 1998/09/11 04:56:33 eeh Exp $ */ +/* $NetBSD: Ovfork.S,v 1.2 1998/12/02 19:29:57 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -44,7 +44,7 @@ #if 0 .asciz "@(#)Ovfork.s 8.1 (Berkeley) 6/4/93" #else - RCSID("$NetBSD: Ovfork.S,v 1.1 1998/09/11 04:56:33 eeh Exp $") + RCSID("$NetBSD: Ovfork.S,v 1.2 1998/12/02 19:29:57 thorpej Exp $") #endif #endif /* SYSLIBC_SCCS and not lint */ @@ -57,6 +57,9 @@ #include "SYS.h" +WARN_REFERENCES(vfork, \ + "warning: reference to compatibility vfork(); include for correct reference") + SYSCALL(vfork) dec %o1 ! from 1 to 0 in child, 0 to -1 in parent retl diff --git a/lib/libc/arch/vax/sys/Ovfork.S b/lib/libc/arch/vax/sys/Ovfork.S index ca51695b063e..42c1370a4c01 100644 --- a/lib/libc/arch/vax/sys/Ovfork.S +++ b/lib/libc/arch/vax/sys/Ovfork.S @@ -33,7 +33,7 @@ #if defined(SYSLIBC_SCCS) && !defined(lint) /* .asciz "@(#)Ovfork.s 8.1 (Berkeley) 6/4/93" */ - .asciz "$NetBSD: Ovfork.S,v 1.2 1997/02/04 18:38:17 ragge Exp $" + .asciz "$NetBSD: Ovfork.S,v 1.3 1998/12/02 19:29:57 thorpej Exp $" #endif /* SYSLIBC_SCCS and not lint */ /* @@ -43,6 +43,9 @@ #include "SYS.h" +WARN_REFERENCES(vfork, \ + "warning: reference to compatibility vfork(); include for correct reference") + /* * pid = vfork(); *