Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
Description
Back when compiler standardization was a mess, we created equally messy sets of typedefs and macros and toggled between them with {{ifdef}}s.
- my_global.h
- InnoDB: univ.i
Starting with 77c184df7c though, we’ve adopted the standards C99 and C++11, which already defines fix-width integers and printf specifiers universally.
Switching to the standardized typedefs and macros modernizes our code and improves:
- Readability, especially for new but experienced members from a standardized background.
- Consistency – int32_t, uint16_t, intptr_t and more are also in use (the last time I checked).
- Compilation time: marko says these checks slow CMake’s single-threaded setup phase.
File sizes(more for deduplication)
InnoDB misleadingly defines ulint/ULINTPF as size_t/%zu as an hack to solve MDEV-12488. Someone who doesn’t know (like past me) would easily cast it (64-bit on x64) to ulong (32-bit on Windows) by accident. We should directly replace them with size_t/%zu.
Attachments
Issue Links
- relates to
-
MDEV-35461 Remove redundant checks for standard library functions
- Open
-
MDEV-35462 Remove redundant checks for obsolete compiler features
- Open
-
MDEV-21978 make my_vsnprintf to use gcc-compatible format extensions
- In Review
- links to