[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Building on Win32 with VS2005

From: Joseph Galbraith <galb_at_vandyke.com>
Date: 2005-11-09 18:09:16 CET

Branko Čibej wrote:
> Steven Kirk wrote:
>>
>>>> .\threadproc\win32\proc.c(353) : warning C4996: 'getenv' was
>>>> declared deprecated
>>>> C:\VS2005\VC\include\stdlib.h(483) : see declaration of
>>>> 'getenv'
>>>> Message: 'This function or variable may be unsafe. Consider
>>>> using _dupenv_s instead. To disable deprecation, use
>>>> _CRT_SECURE_NO_DEPRECATE. See online help for details.'
>>>>
>>>
>>> Aargh! So now #*$@^*&! Microsoft is "deprecating" ISO-C standard
>>> functions, the fscking bastards.
>>>
>> From http://msdn2.microsoft.com/en-us/library/8ef0s5kh
>>
>> It should be noted that in this context, "deprecated" just means that
>> a function's use is not recommended; it does not indicate that the
>> function is scheduled to be removed from the CRT.
> Then they should jolly well pick up a dictionary and learn the language.

Hmmm... dictionary.com:

dep·re·cate Pronunciation Key (dpr-kt)
tr.v. de·pre·cat·ed, de·pre·cat·ing, de·pre·cates
    1. To express disapproval of; deplore.
    2. To belittle; depreciate.

I believe they have used the word correctly, though maybe not
the way most of us in the computer world think it should be
used.

> And it's about time compilers stopped trying to be smarter than people.
> Granted that your average run-of-the-mill programmer is a moron, it's
> not the compiler's responsibility to educate them.

Compilers _are_ smarter that pretty much everyone but me :-)

But seriously, in this day of buffer overruns, viruses,
worms, spyware, and DRM, I'm not sure that that the new
functions are a completely bad idea... and they did give
you two different ways to turn the warnings off.

Just for example, did you ever think the getenv is unsafe? I
didn't... until I started to think about this particular warning.

I'm still not entirely sure why MS thinks it unsafe, but my
guess is that you can't safely use getenv in a multi-threaded
environment (were some other thread might call putenv and force
the reallocation of the environment block.)

So maybe, just maybe, this isn't an entirely stupid thing... just
a pain in the neck.

Thanks,

Joseph

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 9 18:10:15 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.