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 <unistd.h> to generate the correct reference.

This warning isn't about an ABI compatibility issue, but the new vfork() is
considerably faster.
This commit is contained in:
thorpej 1998-12-02 19:29:56 +00:00
parent fd3af06364
commit efd37a7da8
10 changed files with 46 additions and 16 deletions

View File

@ -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 <unistd.h> for correct reference")
SYSCALL(vfork)
cmovne a4, zero, v0 /* a4 (rv[1]) != 0, child */
RET

View File

@ -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 <unistd.h> for correct reference")
/*
* pid = vfork();
*/

View File

@ -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 <machine/asm.h>
#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 <unistd.h> for correct reference")
/*
* pid = vfork();
*

View File

@ -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 <unistd.h> for correct reference")
/*
* pid = vfork();
*

View File

@ -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 <unistd.h> for correct reference")
/*
* pid = vfork();
*

View File

@ -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 <unistd.h> for correct reference")
/*
* r0 = pid of child in parent / pid of parent in child
* r1 = 0 in parent, 1 in child

View File

@ -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 <unistd.h> 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

View File

@ -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 <unistd.h> for correct reference")
SYSCALL(vfork)
dec %o1 ! from 1 to 0 in child, 0 to -1 in parent
retl

View File

@ -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 <unistd.h> for correct reference")
SYSCALL(vfork)
dec %o1 ! from 1 to 0 in child, 0 to -1 in parent
retl

View File

@ -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 <unistd.h> for correct reference")
/*
* pid = vfork();
*