This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fix warning in nismodule.c on OpenBSD
Type: Stage:
Components: Build, Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, henry.precheur
Priority: normal Keywords: patch

Created on 2009-07-04 21:39 by henry.precheur, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch-Modules_nismodule_c henry.precheur, 2009-07-04 21:39 Fix a warning in nismodule.c on OpenBSD
nismodule.patch amaury.forgeotdarc, 2009-07-07 01:00
Messages (6)
msg90128 - (view) Author: Henry Precheur (henry.precheur) Date: 2009-07-04 21:39
On OpenBSD the file /usr/include/rpcsvc/ypclnt.h contains the following
declaration:

struct ypall_callback {
	/* return non-0 to stop getting called */
	int (*foreach)(unsigned long, char *, int, char *, int, void *);
	char *data;		/* opaque pointer for use of callback fn */
};

the 'foreach' function pointer's declaration in Modules/nismodule.c is
different:

gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -I. -I./Include -I/usr/local/include -IInclude
-I/home/henry/py3k -c /home/henry/py3k/Modules/nismodule.c -o
build/temp.openbsd-4.6-amd64-3.2/home/henry/py3k/Modules/nismodule.o
/home/henry/py3k/Modules/nismodule.c: In function `nis_cat':
/home/henry/py3k/Modules/nismodule.c:208: warning: assignment from
incompatible pointer type


The attached patch fixes this very important issue :)
msg90196 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-07-06 23:26
Does someone know whether FreeBSD or NetBSD need the same treatment?
msg90199 - (view) Author: Henry Precheur (henry.precheur) Date: 2009-07-06 23:42
FreeBSD does.

http://svn.freebsd.org/viewvc/base/stable/7/include/rpcsvc/ypclnt.h?revision=172506&view=markup

But NetBSD doesn't:

http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/include/rpcsvc/ypclnt.h?rev=1.13&content-type=text/plain&only_with_tag=MAIN

On Mon, Jul 06, 2009 at 11:26:45PM +0000, Amaury Forgeot d'Arc wrote:
> 
> Amaury Forgeot d'Arc <amauryfa@gmail.com> added the comment:
> 
> Does someone know whether FreeBSD or NetBSD need the same treatment?
> 
> ----------
> nosy: +amaury.forgeotdarc
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue6420>
> _______________________________________
msg90207 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-07-07 01:00
What about this new patch?
msg90210 - (view) Author: Henry Precheur (henry.precheur) Date: 2009-07-07 01:49
It works on OpenBSD, but I don't have any FreeBSD to test. I should be
safe to commit though, the patch is rather trivial.
msg90213 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-07-07 06:53
Thanks, fixed in r73873, r73874, r73875 and r73876.
History
Date User Action Args
2022-04-11 14:56:50adminsetgithub: 50669
2009-07-07 06:53:35amaury.forgeotdarcsetstatus: open -> closed
resolution: fixed
messages: + msg90213
2009-07-07 01:49:16henry.precheursetmessages: + msg90210
2009-07-07 01:00:03amaury.forgeotdarcsetfiles: + nismodule.patch
keywords: + patch
messages: + msg90207
2009-07-06 23:42:06henry.precheursetmessages: + msg90199
2009-07-06 23:26:44amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg90196
2009-07-04 21:39:25henry.precheurcreate