Opened 2 years ago

Closed 2 years ago

#26142 closed defect (implemented)

replace uses of U64_* and I64_* macros with their C99 stdint.h or inttypes.h equivalents

Reported by: catalyst Owned by:
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: technical-debt, cleanup
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


There are many macros in compat.h that try to portably handle 64-bit integer values in printf() and scanf() calls. Now that we seem to require C99, we should use the equivalent macros from stdint.h or inttypes.h instead. For example, U64_FORMAT is equivalent to PRIu64 in inttypes.h.

Child Tickets

Change History (2)

comment:1 Changed 2 years ago by nickm

+1. And also see macros in torint.h.

An ideal patch here would be a script-generated one, to make it easier to audit.

comment:2 Changed 2 years ago by nickm

Resolution: implemented
Status: newclosed

Closing as duplicate of #26626, which we implemented.

Note: See TracTickets for help on using tickets.