unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Eli Zaretskii" <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Problem with library images on Windows (again)
Date: Fri, 20 May 2005 17:44:16 +0300	[thread overview]
Message-ID: <01c55d4a$Blat.v2.4$8e2e76e0@zahav.net.il> (raw)
In-Reply-To: <f7ccd24b05052003421b54fb3b@mail.gmail.com> (message from Juanma Barranquero on Fri, 20 May 2005 12:42:09 +0200)

> Date: Fri, 20 May 2005 12:42:09 +0200
> From: Juanma Barranquero <lekktu@gmail.com>
> 
> Unless I'm wrong, the issue is not how the functions are defined on
> the headers, because we don't statically link against the functions,
> but how are they compiled in the library and how do we define the
> fn_XXX pointers to them.

It's the issue with both: the prototypes in the header files should be
consistent with how the functions were compiled, since those
prototypes are the only way for the compiler to know how the functions
were compiled.  If it doesn't know that, it might produce wrong code.

> In this case, the GnuWin32 TIFF 3.7.2
> libraries seem to be compiled to use C calling conventions, but we
> declare pointers to them with DEF_IMGLIB_FN, which says unequivocally
> that they're FARPROC (i.e, "pascal").

That seems to be the problem.  What I still don't get is how come the
same declaration that uses FARPROC works for the MinGW build?  Can you
figure this out?

If we know this, we could fix the DEF_IMGLIB_FN macro so that it does
TRT for both compilers, e.g., by using __MINGW__ condition.

> The TIFF page in gnuwin32.sourceforge.net says:
> 
> "The GnuWin32 distribution comes in two versions. The ordinary version
> uses the standard Unix equivalents, such as fopen and read, for input
> and output, the other version (Tiff-win32) uses the Win32 API
> functions, such as CreateFile and ReadFile, for input and output. The
> ordinary version (Tiff) is more suitable for porting Unix programs,
> the Win32-API version is more suitable for writing Win32 programs."

This doesn't say anything about the calling conventions, just about
the inner workings of the functions.  So I'm not surprised that both
versions have the same effect.

  reply	other threads:[~2005-05-20 14:44 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18 15:53 Problem with library images on Windows (again) Juanma Barranquero
2005-05-18 19:30 ` Andreas Schwab
2005-05-18 22:44   ` Juanma Barranquero
2005-05-19  6:58     ` Jason Rumney
2005-05-18 22:16 ` Jason Rumney
2005-05-18 22:52   ` Juanma Barranquero
2005-05-19  3:50     ` Eli Zaretskii
2005-05-19  8:13       ` Juanma Barranquero
2005-05-19 19:05         ` Eli Zaretskii
2005-05-19 19:31           ` Juanma Barranquero
2005-05-19 19:32             ` Juanma Barranquero
2005-05-20  7:20             ` Eli Zaretskii
2005-05-20  8:24               ` Kim F. Storm
2005-05-20 10:01                 ` Eli Zaretskii
2005-05-20 10:16                 ` Jason Rumney
2005-05-20 10:42                   ` Juanma Barranquero
2005-05-20 14:44                     ` Eli Zaretskii [this message]
2005-05-20 15:46                       ` Jason Rumney
2005-05-20 15:52                         ` Eli Zaretskii
2005-05-20 16:33                           ` Juanma Barranquero
2005-05-20 17:57                             ` Juanma Barranquero
2005-05-21 10:21                               ` Jason Rumney
2005-05-21 10:33                                 ` Juanma Barranquero
2005-05-21 21:13                                   ` Jason Rumney
2005-05-22 21:21                                     ` Juanma Barranquero
2005-06-03 12:08                                       ` Juanma Barranquero
2005-06-03 13:06                                         ` David Kastrup
2005-06-03 15:28                                           ` jasonr
2005-06-03 17:23                                             ` Stefan Monnier
2005-06-05  0:44                                           ` Juanma Barranquero
2005-06-06 11:26                                             ` Juanma Barranquero
2005-06-14  2:02                                               ` Juanma Barranquero
2005-06-14  7:32                                                 ` David Kastrup
2005-06-14  9:15                                                   ` Juanma Barranquero
2005-05-20 16:31                         ` Juanma Barranquero
2005-05-20 16:29                       ` Juanma Barranquero
2005-05-20 12:19                   ` Benjamin Riefenstahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01c55d4a$Blat.v2.4$8e2e76e0@zahav.net.il' \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).