NetBSD Problem Report #10077
Received: (qmail 23198 invoked from network); 8 May 2000 22:17:43 -0000
Message-Id: <200005082217.e48MHCW05612@ebola.usanetworks.com>
Date: Mon, 8 May 2000 18:17:12 -0400 (EDT)
From: Andrew Brown <atatat@atatdot.net>
Reply-To: Andrew Brown <atatat@atatdot.net>
To: gnats-bugs@gnats.netbsd.org
Subject: unproven-pthreads users cannot set h_errno
X-Send-Pr-Version: 3.95
>Number: 10077
>Category: pkg
>Synopsis: unproven-pthreads users cannot set h_errno, only read it
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: atatat
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon May 08 22:18:00 +0000 2000
>Closed-Date: Sun Apr 08 04:26:50 +0000 2001
>Last-Modified: Sun Apr 08 04:26:50 +0000 2001
>Originator: TheMan
>Release: 1.4X of 20000504
>Organization:
none
>Environment:
System: NetBSD ebola 1.4X NetBSD 1.4X (RESTON) #7: Mon May 8 16:42:28 EDT 2000 andrew@ebola:/usr/src/sys/arch/i386/compile/RESTON i386
(haven't updated for a few days)
>Description:
unproven-pthreads package's definitions of h_errno
# grep h_errno /usr/pkg/pthreads/include/*.h
/usr/pkg/pthreads/include/netdb.h:extern int h_errno;
/usr/pkg/pthreads/include/netdb.h: * (left in extern int h_errno).
/usr/pkg/pthreads/include/resolv.h:#define h_errno (_res_get_error())
conflict, and are incompatible with the man page's
(man gethostbyname) definition of h_errno
# grep h_errno /usr/include/*.h
/usr/include/netdb.h:extern int h_errno;
/usr/include/netdb.h: * (left in extern int h_errno).
thus leaving the actual behavior of such an application a
mystery to me, but definitely rendering h_errno as something
that can't be used as an lvalue.
>How-To-Repeat:
decide to play with sendmail's filtering api. read docs.
attempt to build fresh sendmail outside of tree.
# cd /usr/local/src/sendmail-8.10.1
# cat > devtools/Site/site.config.m4
dnl Milter
APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_MILTER=1 -I/usr/pkg/pthreads/include')
APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER=1 -I/usr/pkg/pthreads/include')
^D
# make
...
cc -O -I. -I../../include -DNEWDB -DNIS -DMAP_REGEX -DNETISO -D_FFR_MILTER=1 -I/usr/pkg/pthreads/include -c daemon.c
daemon.c: In function `makeconnection':
daemon.c:1554: invalid lvalue in assignment
daemon.c: In function `host_map_lookup':
daemon.c:2795: invalid lvalue in assignment
# more +1554 sendmail/daemon.c
...
h_errno = 0;
...
>Fix:
dunno. i assume *we* could come up with a patch to the
unproven-pthreads package to work this properly (i think
h_errno should be a function that returns a pointer to
an int, although i don't know how to make it non-volatile
off the top of my head), but really the threads package
shouldn't be violating the api like that. imo.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: atatat
State-Changed-When: Sat Apr 7 21:25:22 PDT 2001
State-Changed-Why:
I can't reproduce the problem I was having. The grep output also
now looks fine.
Responsible-Changed-From-To: pkg-manager->atatat
Responsible-Changed-By: atatat
Responsible-Changed-When: Sat Apr 7 21:25:22 PDT 2001
Responsible-Changed-Why:
My pr, which seems pointless now.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.