Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89345 - sys-apps/netkit-base-0.17-r8 gcc4 patch
Summary: sys-apps/netkit-base-0.17-r8 gcc4 patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://debian-ppc64.alioth.debian.org...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-16 13:06 UTC by Marcelo Goes (RETIRED)
Modified: 2005-04-29 03:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
netkit-base-0.17-gcc4.diff (netkit-base-0.17-gcc4.diff,398 bytes, patch)
2005-04-16 13:08 UTC, Marcelo Goes (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcelo Goes (RETIRED) gentoo-dev 2005-04-16 13:06:57 UTC
Hi there,
I'm attaching a patch based on a patch from Debian that allows gcc-4 compilation.

Also, I would like to report a file collision:

* checking 29 files for package collisions
existing file /usr/share/man/man3/daemon.3.gz is not owned by this package

$ qpkg -f /usr/share/man/man3/daemon.3.gz
sys-apps/man-pages *
Comment 1 Marcelo Goes (RETIRED) gentoo-dev 2005-04-16 13:08:36 UTC
Created attachment 56472 [details, diff]
netkit-base-0.17-gcc4.diff

Just add
epatch ${FILESDIR}/${P}-gcc4.diff
to src_unpack().
Comment 2 SpanKY gentoo-dev 2005-04-16 22:39:10 UTC
ive fixed the manpage install ... that patch looks funky, is it ok ?
Comment 3 Marcelo Goes (RETIRED) gentoo-dev 2005-04-17 07:08:52 UTC
It is ok as in "it works".

It makes sense to me since there should be no need to use (type)a = (type)x when assigning a value, just a = (type)x should work. But this is in the wire fields of gcc-4...
Comment 4 SpanKY gentoo-dev 2005-04-18 18:07:47 UTC
yes, but if you do something like
char blah[4];
(*int)blah[0] = 40303;

that acts differently from say
char blah[4];
blah[0] = 40303;

so if all the swap() usage in netkit-base is pointer clean, the change should be fine
Comment 5 Marcelo Goes (RETIRED) gentoo-dev 2005-04-18 18:59:15 UTC
Well then, if understand you correctly the following will yield messed up results?

if (cp->se_user)
	SWAP(char *, sep->se_user, cp->se_user);

If so, I agree it is wiser to reject the patch.
Comment 6 Marcelo Goes (RETIRED) gentoo-dev 2005-04-18 19:24:09 UTC
To make it easier, the code:

#define SWAP(type, a, b) {type c=(type)a; a=(type)b; b=(type)c;}

		/*
		 * sep->se_wait may be holding the pid of a daemon
		 * that we're waiting for.  If so, don't overwrite
		 * it unless the config file explicitly says don't 
		 * wait.
		 */
		if (cp->se_bi == 0 && (sep->se_wait == 1 || cp->se_wait == 0))
			sep->se_wait = cp->se_wait;
		if (cp->se_max != sep->se_max)
			SWAP(int, cp->se_max, sep->se_max);
		if (cp->se_user)
			SWAP(char *, sep->se_user, cp->se_user);
		if (cp->se_group)
			SWAP(char *, sep->se_group, cp->se_group);
		if (cp->se_server)
			SWAP(char *, sep->se_server, cp->se_server);
		if (cp->se_address) {
			/* must swap se_service; se_address points into it */
			SWAP(char *, sep->se_service, cp->se_service);
			SWAP(char *, sep->se_address, cp->se_address);
		}
		for (i = 0; i < MAXARGV; i++)
			SWAP(char *, sep->se_argv[i], cp->se_argv[i]);
#undef SWAP
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2005-04-29 03:45:39 UTC
The pointer arith is fine (just swaps info between two struct's of the same type).
Added to cvs, thanks.