Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx014.isp.belgacom.be (inmx014.isp.belgacom.be [195.238.2.217])
        by mailst034.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i8FFeOiA024858
        for <joris.at.lebbeke@skynet.be>; Wed, 15 Sep 2004 17:40:24 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx014.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i8FFcfYI024614
        for <joris.at.lebbeke@skynet.be>; Wed, 15 Sep 2004 17:38:43 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id 2868B2EAD43; Wed, 15 Sep 2004 11:38:36 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from scooby.simplesystems.org (scooby.simplesystems.org
	[65.66.246.67])
	by xserve.flids.com (Postfix) with ESMTP id B08BD2EAD04
	for <tiff@remotesensing.org>; Wed, 15 Sep 2004 11:38:27 -0400 (EDT)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by scooby.simplesystems.org (8.12.10+Sun/8.12.10) with ESMTP id
	i8FFcL9p018625; Wed, 15 Sep 2004 10:38:21 -0500 (CDT)
Date: Wed, 15 Sep 2004 10:38:21 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@blade.simplesystems.org
To: Frank Warmerdam <warmerdam@pobox.com>
Subject: Re: [Tiff] Calltype support
In-Reply-To: <41485EEE.2090008@pobox.com>
Message-ID: <Pine.SOC.4.60.0409151032460.15634@blade.simplesystems.org>
References: <4146D0A6.2050807@paradatec.de> <4148479E.7060000@pobox.com>
	<Pine.SOC.4.60.0409150955120.15634@blade.simplesystems.org>
	<41485EEE.2090008@pobox.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: tiff@remotesensing.org, Martin Schramm <m.schramm@paradatec.de>
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: 3b8d2189a46e80df8eefddc10f272662

On Wed, 15 Sep 2004, Frank Warmerdam wrote:
>
> But we do maintain a libtiff.def already to keep the list of functions to
> be exported.  The issue in question is calling conventions which is in
> addition to the issue of controlling what gets exported.

The libtiff.def approach is easier for the library maintainer but it 
is invasive for the library user.  DLL exported functions should be 
__declspec(dllimport) by default so that library users don't need to 
know if they are using a DLL.  This can be accomplished with 
appropriately "decorated" header files.

> I have used macros like your TIFFEXPORT (which presumably evaluates to
> __declspec(dllexport) on win32) before, but I don't know that it is
> sufficient to handle calling convention issues.  It seems to me I have run
> into issues with where the __cdecl parameter goes in the declaration of a
> function and it wasn't always sufficient to just put it in where the
> __declspec(dllexport) would go, and that for this reason a more complex
> function macro mechanism was required.

I don't have the expertise to answer that. We have not had to do 
anything more than __declspec(dllimport)/__declspec(dllexport) for the 
GraphicsMagick libraries.  To invoke the Ghostscript DLL functions 
there was some use of stdcall.

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
