"_" prefix in Windows stdlib calls (was: [GSOC]Firebird Integration Weekly Update 03)

Norbert Thiebaud nthiebaud at gmail.com
Mon Jul 1 04:23:42 PDT 2013


On Mon, Jul 1, 2013 at 4:01 AM, Lionel Elie Mamane <lionel at mamane.lu> wrote:
> On Mon, Jul 01, 2013 at 12:17:41AM -0500, Norbert Thiebaud wrote:
>> On Sun, Jun 30, 2013 at 2:05 PM, Andrzej J. R. Hunt <andrzej at ahunt.org> wrote:
>
>>> Finally I've had to do things like replace snprintf with _snprintf --
>>> currently decided using an ifdef -- this seems somewhat unclean but I'm
>>> not sure of any better way to do this.
>
> A Windows expert will maybe correct me, but I think this "_" prefix is
> just part of the Windows ABI (name mangling or C name decoration) and
> thus should not be in the source code. It should be added
> ~automatically by the compiler.

While it is true that _ is added.. in that case the underlying symbol
is __snprintf
a lot of 'normal' c/posix function 'foo' are named _foo on windows for
some reason...

http://msdn.microsoft.com/en-US/library/ms235384%28v=vs.80%29.aspx

Norbert


More information about the LibreOffice mailing list