| Summary: | sys-apps/netkit-base-0.17-r8 gcc4 patch | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Marcelo Goes (RETIRED) <vanquirius> |
| Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | http://debian-ppc64.alioth.debian.org/gcc4/patches/netkit-base_0.10-10.0.0.1.gcc4.patch | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | netkit-base-0.17-gcc4.diff | ||
|
Description
Marcelo Goes (RETIRED)
2005-04-16 13:06:57 UTC
Created attachment 56472 [details, diff]
netkit-base-0.17-gcc4.diff
Just add
epatch ${FILESDIR}/${P}-gcc4.diff
to src_unpack().
ive fixed the manpage install ... that patch looks funky, is it ok ? 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... 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 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. 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
The pointer arith is fine (just swaps info between two struct's of the same type). Added to cvs, thanks. |