Details
-
Epic
-
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
-
- Closed
-
-
MDEV-35599 Which llstr(value, buff) can we replace with sprintf(buff, "%lld", value) ?
-
- Stalled
-
-
MDEV-36326 Fix untyped pointers from uchar* to void*
-
- Open
-
- links to
It cannot be assigned to you, the list of allowed assignees is limited to developers with write access.
But it doesn't matter, you can still work on it and create a pull request, after that the issue will be assigned to the developer who will review and merge your PR.