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
>>>> 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.
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
> 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.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Wed Nov 9 18:10:15 2005