Ticket #43357

Configure check for proper size_t printf() format

Eröffnet am: 2021-12-09 10:48 Letztes Update: 2021-12-24 17:48

Auswertung:
Verantwortlicher:
Typ:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
4

Details

For better support of using size_t variables in the printf() family of functions, add a configure check for determining which kind of specifier should be used for them. This ticket is about autotools implementation, though care should be taken not to completely break meson build.

As part of #43200, this has also been posted to http://forum.freeciv.org/f/viewtopic.php?f=14&t=92093

Ticket-Verlauf (3/15 Historien)

2021-12-09 10:48 Aktualisiert von: cazfi
  • New Ticket "Confgure check for proper size_t printf() format" created
2021-12-09 10:52 Aktualisiert von: cazfi
  • Lösung Update from Keine to Accepted
2021-12-09 11:00 Aktualisiert von: cazfi
  • Summary Updated
2021-12-09 12:01 Aktualisiert von: cazfi
  • Details Updated
2021-12-13 00:38 Aktualisiert von: cazfi
  • Lösung Update from Accepted to Keine
Kommentar

That "%ldd" should be "%lld"

2021-12-13 06:22 Aktualisiert von: cazfi
  • Lösung Update from Keine to Accepted
Kommentar

- New version corrects "%lld"

2021-12-13 13:12 Aktualisiert von: cazfi
  • Lösung Update from Accepted to Keine
Kommentar

This was a great pain to debug in msys2, but it turns out that %zu is valid format specifier for printf() (which we used in configure test), but not for our function declared with attribute((format(printf, ...)))

I have other fixes to this as well. Will submit a new version later.

2021-12-16 12:55 Aktualisiert von: cazfi
  • Lösung Update from Keine to Accepted
Kommentar

New patch version
- Make sure that the build test has -Wall and -Werror set so that it fails for specifiers for which it should
- Added "checking..." outputs
- In the compilation test, call function defined with attribute((format(printf, ...))) instead of printf()

2021-12-20 14:00 Aktualisiert von: cazfi
  • Lösung Update from Accepted to Keine
Kommentar

Crosser based build fails with the current patch version. It would expect "%I64d"

2021-12-20 21:20 Aktualisiert von: cazfi
  • Lösung Update from Keine to Accepted
Kommentar

Support for "%I64d" added in latest version

2021-12-24 17:48 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Accepted to Gefixt

Bearbeiten

Please login to add comment to this ticket » Anmelden