[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
*zprintf as overrides
From: |
Bruno Haible |
Subject: |
*zprintf as overrides |
Date: |
Sun, 30 Jun 2024 02:27:51 +0200 |
Hi Paul,
In <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00353.html> you
suggested:
> I'm tempted to use "#define printf zprintf" and leave most of the source
> code alone. Perhaps there should be a Gnulib option for that.
We can do this through one or more gnulib modules.
What I'm wondering is whether it's best to have
* one module per function, i.e.
- one module for sprintf -> szprintf,
- one module for snprintf -> snzprintf,
- one module for vsprintf -> vszprintf,
- one module for vsnprintf -> vsnzprintf,
- one module for dprintf -> dzprintf,
- one module for vdprintf -> vdzprintf,
- one module for fprintf -> fzprintf,
- one module for vfprintf -> vfzprintf,
etc.
* or one module per function group, i.e.
- one module for *s*printf -> *s*zprintf,
- one module for *d*printf -> *d*zprintf,
- one module for *f*printf -> *f*zprintf,
* or one module for all of them together.
And in the first case, what to do if the package requests redirection
of, say, sprintf but then uses vsprintf without redirection? Emit a
warning "vsprintf used but is not 64-bit clean, use vszprintf instead"?
What do you think?
Bruno
- *zprintf as overrides,
Bruno Haible <=