Skip to Content.
Sympa Menu

freetds - RE: Non portable code

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: Non portable code
  • Date: Wed, 2 Oct 2002 14:09:58 -0400


> From: Bob Kline [mailto:bkline AT rksystems.com]
> Sent: October 2, 2002 1:46 PM
> >
> > Not a few ANSI-standard functions have an underscore prepended to
> > them in Microsoft's implementation. I've never seen their
> > rationale.
>
> I assume it's just a question of lagging behind the standards
> committees
> (vsnprintf wasn't in the original ANSI C standard, and it
> probably still
> isn't part of the standard C++ library). I don't think
> you'll find many
> vendors putting out documents with the word "rationale" in
> their titles
> to explain why their products are out of date. :->}

Heh, no, guess not. :-)

You're more generous than I am, it seems. A leading underscore normally
indicates an internal not-normally-used function, and is a hint (or more) to
look for a higher level substitute. But Microsoft's header files are
littered with AFAICT nonsensical nonstandardisms. I can't even see how it
helps them, except to make porting code surreally difficult. Which isn't
always in the plus column, anyway.

Here's an example of the oddness, in stdio.h:

#ifdef _POSIX_
_CRTIMP FILE * __cdecl fdopen(int, const char *);
#else
_CRTIMP FILE * __cdecl _fdopen(int, const char *);
#endif

It's hard for me to put a good face on that, not that I'm trying.

Regards,

--jkl


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that for certain accounts we do not accept
orders and/or instructions by e-mail, and for those accounts we will not be
responsible for carrying out such orders and/or instructions. Kindly refrain
from sending orders or instructions by e-mail unless you have confirmed that
we accept such communications for your account. Please also note that to
satisfy regulatory requirements we review the outgoing and incoming e-mail
correspondence of staff members serving certain functions.






Archive powered by MHonArc 2.6.24.

Top of Page