[Bug 3097] New: BB making easily-fixed non-portable assumptions
bugzilla at busybox.net
bugzilla at busybox.net
Sat Jan 15 23:19:29 UTC 2011
https://bugs.busybox.net/show_bug.cgi?id=3097
Summary: BB making easily-fixed non-portable assumptions
Product: Busybox
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P5
Component: Standard Compliance
AssignedTo: unassigned at busybox.net
ReportedBy: bugdal at aerifal.cx
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
Four issues, patch to fix them is attached:
1. Apparently BB is relying on header pollution to get the definitions of
major() and minor() macros used by tar, cpio, etc. The "correct" header for
them is sys/sysmacros.h. The attached patch includes sysmacros.h, but only if
major was not already defined by another header (usually sys/types.h).
2. COMMON_BUFSIZE is insufficient for inetd unless libc BUFSIZ is >= ~2k. Patch
fixes it, but some tweaking may be desired to find the minimal value that will
work.
3. BB is using the nonstandard "fdprintf" name by default for a function that
was standardized by POSIX 2008 as "dprintf". Attached patch checks
_POSIX_VERSION and uses the standard name when POSIX 2008 is detected, but a
better solution would be to always use dprintf except on a finite known-bad set
of systems that lack it. Unfortunately I don't know which systems these are.
4. networking/interface.c tries to include a kernel header by default instead
of using the userspace net/ethernet.h, unless it detects glibc or newlib. The
correct behavior would be to use the correct userspace header except on a
finite known set of systems that lack it, but I don't know what these systems
are, so I used a dummy "WTF_SOME_WEIRD_LIBC" as the test instead. This should
obviously be fixed before committing.
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list