[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #7304 [Tor]: tor_snprintf instead of snprintf
#7304: tor_snprintf instead of snprintf
-------------------------+--------------------------------------------------
Reporter: ultramage | Owner:
Type: enhancement | Status: new
Priority: trivial | Milestone:
Component: Tor | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Several places call 'snprintf' from stdio.h instead of 'tor_snprintf' from
common/compat.h. Replacing them removes one dependency that complicates
Windows nmake builds.
Complete list of occurences:
src/common/util.c (<= 0.2.3.24-rc)
src/or/routerparse.c
src/ext/eventdns.c
src/ext/OpenBSD_malloc_Linux.c
src/ext/tinytest.c
Also, since the Microsoft _snprintf function has nonstandard semantics
(which is why they renamed it), doing "#define snprintf _snprintf", as in
src/or/or.h and src/common/compat.h is okay, but not so great.
Similarly, 'vsnprintf' could be replaced by 'tor_vsnprintf' in two places,
which would simplify the #ifdefing going on.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7304>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs