www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Definition of extern(System)?

reply Jonathan M Davis <jmdavisProg gmx.com> writes:
As http://d.puremagic.com/issues/show_bug.cgi?id=4788 points out, 
extern(System) isn't properly documented, so I have no idea what it translates 
to. Does anyone know what exactly it translates to on Linux/Posix and Windows?

- Jonathan M Davis
Jan 24 2012
next sibling parent Mike Wey <mike-wey example.com> writes:
On 01/25/2012 05:39 AM, Jonathan M Davis wrote:
 As http://d.puremagic.com/issues/show_bug.cgi?id=4788 points out,
 extern(System) isn't properly documented, so I have no idea what it translates
 to. Does anyone know what exactly it translates to on Linux/Posix and Windows?

 - Jonathan M Davis

extern(Windows) on windows and extern(C) on everything else. -- Mike Wey
Jan 25 2012
prev sibling next sibling parent Trass3r <un known.com> writes:
I was pretty sure it's somewhere in the spec.
Jan 25 2012
prev sibling next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, January 25, 2012 22:31:19 Mike Wey wrote:
 On 01/25/2012 05:39 AM, Jonathan M Davis wrote:
 As http://d.puremagic.com/issues/show_bug.cgi?id=4788 points out,
 extern(System) isn't properly documented, so I have no idea what it
 translates to. Does anyone know what exactly it translates to on
 Linux/Posix and Windows?
 
 - Jonathan M Davis

extern(Windows) on windows and extern(C) on everything else.

But it doesn't include export in with the extern(Windows)? - Jonathan M Davis
Jan 25 2012
prev sibling next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, January 25, 2012 23:18:04 Trass3r wrote:
 I was pretty sure it's somewhere in the spec.

I can't find it searching for it or grepping for it. - Jonathan M Davis
Jan 25 2012
prev sibling parent "Daniel Murphy" <yebblies nospamgmail.com> writes:
"Jonathan M Davis" <jmdavisProg gmx.com> wrote in message 
news:mailman.11.1327521278.25230.digitalmars-d-learn puremagic.com...
 As http://d.puremagic.com/issues/show_bug.cgi?id=4788 points out,
 extern(System) isn't properly documented, so I have no idea what it 
 translates
 to. Does anyone know what exactly it translates to on Linux/Posix and 
 Windows?

It should be on http://www.d-programming-language.org/attribute.html in the 'Linkage Attribute' section, but naturally it's only mentioned. But at least I can tell you in the compiler, the definition is simple: else if (id == Id::System) { #if _WIN32 link = LINKwindows; #else link = LINKc; #endif }
Jan 25 2012