Opened 15 years ago
Last modified 11 months ago
#4929 assigned enhancement
Rename dprintf() to Avoid Clash with the POSIX.1-2008 Function
Reported by: | bonefish | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1.1 |
Component: | System/Kernel | Version: | R1/alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | #15366 | |
Platform: | All |
Description
POSIX.1-2008 introduces the functions [v]dprintf(). To avoid a name clash when we implement them, the kernel dprintf() should be renamed to debug_printf(). We can continue provide the old symbol for binary compatibility.
Change History (15)
comment:1 by , 9 years ago
Milestone: | R1 → Unscheduled |
---|
comment:2 by , 9 years ago
Milestone: | Unscheduled → R1 |
---|
comment:3 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 5 years ago
Blocking: | 15366 added |
---|
comment:6 by , 4 years ago
Is it really needed? Kernel is not expected to provide full POSIX support.
comment:8 by , 4 years ago
Replying to waddlesplash:
The problem also applies to libroot.
No, in userland it is already called debug_printf and libroot exports the other dprintf(ff, format, ...)
from stdio.
comment:9 by , 4 years ago
It's not a "needed" change, but just to avoid confusion by having two different functions in two different places doing different things.
The kernel is of course not implementing the full POSIX API, but we at least try to keep it as close as reasonably possible as it makes development a lot easier and removes a lot of "oh no I'm writing kernel code, I need magic incantations" feeling by having a subset of the same APIs available.
comment:10 by , 4 years ago
Milestone: | R1 → R1.1 |
---|
comment:11 by , 15 months ago
It would also be useful to rename the function to easily enable building kernel stuff that uses dprintf() in userland.
comment:13 by , 13 months ago
I would stick to debug_printf
, as it's already called this way in userland, too.
comment:14 by , 13 months ago
I don't think the name is very important, as long as we avoid confusion with dprintf. Soe if debug_printf is more popular, let's go with that!
comment:15 by , 11 months ago
I would stick to debug_printf, as it's already called this way in userland, too.
But then we'd have a clash between debug_printf() in libroot and debug_printf() in kernelland-emu for tests. At least with printf, the output will go to stdio, rather than to syslog.
Reverting earlier milestone change