How about removing non-Linux code?

Dmitry V. Levin ldv at altlinux.org
Tue Feb 7 15:05:11 UTC 2012


Hi,

On Tue, Feb 07, 2012 at 02:06:24PM +0100, Denys Vlasenko wrote:
> Hi Dmitry,
> 
> Non-linux code (FreeBSD/SunOS/SVR4) appears to be dead.
> 
> I looked through changelog and all changes to this code
> since at least 2005 only keep it in line with evolution
> of Linux code (such as changing the name of a struct field).
> 
> I don't see a single build failure fix. Or a genuine bug fix.
> In fact I would be surprised if this code even compiles -
> it's likely no one tests that.
> 
> Are FreeBSD/SunOS/SVR4 in fact build their strace from
> our code? I would be mightily surprised if they do...

There is no evidence they do it nowadays.

It is known that the FreeBSD code doesn't build for a few years.
There were no reports of any kind about non-Linux code, so I suppose
we can treat that code as dead.

Also, with kicking out old detach-before-exit code in September we have
to admit that linux < 2.6 is no longer supported, too.

> Since there is a lot of this code, it makes actual, live code
> harder to understand because of additional ifdefs:
[...]
> What do you think about removing all non-Linux code after the next release?

I'm inclined to think it would be better to remove that dead code.

I actually played with that idea a bit, and found out that something like
	unifdef -DLINUX -Dlinux -USUNOS4 -USVR4 -UUNIXWARE -UFREEBSD \
		-USUNOS4_KERNEL_ARCH_KLUDGE -UHAVE_MP_PROCFS \
		-UHAVE_POLLABLE_PROCFS -UHAVE_PR_SYSCALL -UUSE_PROCFS
could be a good starting point.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20120207/37feb0ce/attachment.bin>


More information about the Strace-devel mailing list