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
  • #27185

Closed (moved)
Open
Opened Aug 17, 2018 by Trac@tracbot

test/test.c and lround() prototype

First off, I have to express my frustration with this Trac-system. Clumsy as hell; the Markdown support is a joke. I'd wish you'd moved to Github or Gitlab.

Okay. To the issue. Compiling test/test.c using MSVC-2017 or clang-cl, spits out this warning:

test.c(42,10):  warning: 'lround' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
long int lround(double x);

From MSVC:

test.c(42): warning C4273: 'lround': inconsistent dll linkage
f:\ProgramFiler-x86\WindowsKits\Include\10.0.16299.0\ucrt\corecrt_math.h(520): 
note: see previous definition of 'lround'

For Windows, it's already prototypes as (after C-preprocessing):

__declspec (dllimport)
  long long __cdecl llround (double _X);

Why not use tor_lround() instead? Same goes for fabs() I guess, but this function is not marked with dllimport!? Seems to be an intrinsic for clang-cl + MSVC.

Trac:
Username: gvanem

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