Subject: Re: vfork in C++?
To: Andrew Cagney <cagney@mac.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: current-users
Date: 11/23/2002 20:20:17
On Sat, Nov 23, 2002 at 08:01:10PM -0800, Jason R Thorpe wrote:

 >  > /usr/lib/libstdc++.so: warning: reference to compatibility vfork(); include <unistd.h> for correct reference
 > 
 > Well, it tells you precisely what needs to happen -- <unistd.h> needs to
 > be included by the source file using vfork().
 > 
 > This warning does not happen on a -current system, but the toolchain has
 > not changed... and I don't see a reference to vfork in the libstdc++ sources,
 > however it is there in the object... hm.

Ah, it was right under my nose:

./libio/iopopen.c:#define _IO_fork vfork /* defined in libiberty, if needed */

-current does indeed include <unistd.h> to get the correct vfork reference,
...and apparently the netbsd-1-6 branch does, as well:

symbolic names:
        netbsd-1-6-RELEASE: 1.2
        netbsd-1-6-RC3: 1.2
        netbsd-1-6-RC2: 1.2
        netbsd-1-6-RC1: 1.2
        netbsd-1-6: 1.2.0.2
        netbsd-1-6-base: 1.2
        gcc-2-95-3: 1.1.1.1
        gcc-2-95-2: 1.1.1.1
        FSF: 1.1.1
keyword substitution: o
total revisions: 3;     selected revisions: 3
description:
----------------------------
revision 1.2
date: 2001/07/26 17:18:39;  author: mrg;  state: Exp;  lines: +1 -1
include <unistd.h> on NetBSD to get vfork() prototype (rename)
----------------------------

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>