Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests code updated for build with MS Visual Studio #49

Closed
wants to merge 6 commits into from
Closed

Tests code updated for build with MS Visual Studio #49

wants to merge 6 commits into from

Conversation

snikulov
Copy link
Member

@snikulov snikulov commented Nov 9, 2012

Fixes for missed API on windows for tests

  • gettimeofday
  • strcasecmp
  • snprintf

Here the error without the fix:

Linking C executable ..\lib1501.exe
lib1501.c.obj : error LNK2019: unresolved external symbol _gettimeofday referenc
ed in function _test
..\lib1501.exe : fatal error LNK1120: 1 unresolved externals
LINK Pass 1 failed. with 2
NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"' :
return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

C:\WORK\oss\b.curl>

@snikulov
Copy link
Member Author

snikulov commented Nov 9, 2012

Only 897aa85 change is matter.

@bagder
Copy link
Member

bagder commented Nov 10, 2012

Thanks for this. I will merge this tomorrow.

@pierrejoye
Copy link
Contributor

I would prefer to provide an implementation when not available and keep the names of well known functions.

ie: I did that in php http://lxr.php.net/xref/PHP_5_4/win32/time.c#59

@snikulov
Copy link
Member Author

@pierrejoye This was also initially comes to mine mind.

Here is what I considered
http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/port/gettimeofday.c;h=75a91993b74414c0a1c13a2a09ce739cb8aa8a08;hb=HEAD
and
http://www.suacommunity.com/dictionary/gettimeofday-entry.php

But then I look around and find already implemented curl api to substitute.
This is holds me from copy-paste idea.

@bagder
Copy link
Member

bagder commented Nov 11, 2012

Right, as we already have these functions in place so this patch makes sense. Pierre's change is indeed interesting as well but should probably be made separately and is a slightly bigger take.

@bagder
Copy link
Member

bagder commented Nov 13, 2012

Thanks, I've merged and pushed that commit now. Hash 7c0cbcf in the git repo.

@bagder bagder closed this Nov 13, 2012
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants