Browse Source

* (again :-( ) make cdecl the default calling convention for everything except Windows and fix compilation under OS/2

git-svn-id: trunk@15137 -
Tomas Hajny 15 years ago
parent
commit
f27bb1efd3
1 changed files with 10 additions and 0 deletions
  1. 10 0
      packages/libgd/src/gd.pas

+ 10 - 0
packages/libgd/src/gd.pas

@@ -26,6 +26,9 @@ uses
 {$ENDIF FPC_TARGET_SUPPORTS_DYNLIBS}
 {$ENDIF FPC_TARGET_SUPPORTS_DYNLIBS}
   ctypes;
   ctypes;
 
 
+(* cdecl as default unless defined differently below *)
+{$DEFINE EXTDECL := cdecl}
+
 {$IFDEF UNIX}
 {$IFDEF UNIX}
   {$DEFINE EXTDECL := cdecl}
   {$DEFINE EXTDECL := cdecl}
   const
   const
@@ -46,6 +49,13 @@ uses
     {$linklib c}
     {$linklib c}
    {$UNDEF LOAD_DYNAMICALLY}
    {$UNDEF LOAD_DYNAMICALLY}
 {$ENDIF GO32V2}
 {$ENDIF GO32V2}
+{$IFDEF OS2}
+(* Force static linking under OS/2 for now to avoid     *)
+(* dependency on dll for a one particular libc version. *)
+  {$UNDEF LOAD_DYNAMICALLY}
+  {$DEFINE gdlib := }
+  {$DEFINE clib := }
+{$ENDIF OS2}
 
 
 {$IFNDEF LOAD_DYNAMICALLY}
 {$IFNDEF LOAD_DYNAMICALLY}
   {$IFDEF darwin}
   {$IFDEF darwin}