Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #7304

Closed (moved)
Open
Opened Nov 04, 2012 by Trac@tracbot

tor_snprintf instead of snprintf

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.

Trac:
Username: ultramage

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.2.4.x-final
Milestone
Tor: 0.2.4.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#7304