From f27bb1efd3cda3fbf16dda80ed6ad7dc3dfbbf62 Mon Sep 17 00:00:00 2001
From: Tomas Hajny <hajny@freepascal.org>
Date: Sun, 11 Apr 2010 11:57:46 +0000
Subject: [PATCH]   * (again :-( ) make cdecl the default calling convention
 for everything except Windows and fix compilation under OS/2

git-svn-id: trunk@15137 -
---
 packages/libgd/src/gd.pas | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/packages/libgd/src/gd.pas b/packages/libgd/src/gd.pas
index 1fa39a4ef7..206b59b599 100644
--- a/packages/libgd/src/gd.pas
+++ b/packages/libgd/src/gd.pas
@@ -26,6 +26,9 @@ uses
 {$ENDIF FPC_TARGET_SUPPORTS_DYNLIBS}
   ctypes;
 
+(* cdecl as default unless defined differently below *)
+{$DEFINE EXTDECL := cdecl}
+
 {$IFDEF UNIX}
   {$DEFINE EXTDECL := cdecl}
   const
@@ -46,6 +49,13 @@ uses
     {$linklib c}
    {$UNDEF LOAD_DYNAMICALLY}
 {$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}
   {$IFDEF darwin}