AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
September 2008

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2008.09.04 20:48 "Re: beta2 release - lfind() problem on Win64", by Edward Lam
2008.09.05 06:18 "Re: beta2 release - lfind() problem on Win64", by Andrey Kiselev
2008.09.05 13:09 "Re: beta2 release - lfind() problem on Win64", by Edward Lam

2008.09.05 13:09 "Re: beta2 release - lfind() problem on Win64", by Edward Lam

Andrey Kiselev wrote:
> Maybe the best solution is to remove the
> 
> #define lfind _lfind
> 
> line from the tif_config.vc and always use the port/lfind.c on Windows.
> Could you try it on Win64?

I tried that before and it doesn't work because __STDC__ is not defined 
by default and so in search.h, it also declares lfind() without the 
underscore.

Here's another way to hack at this. What do you think?

- Rename port's lfind() to _TIFFlfind()
- In tif_config.vc.h,
      #define HAVE_BROKEN_LFIND 1
- In tif_dirinfo.c,
      #ifdef HAVE_BROKEN_LFIND
          extern void *_TIFFlfind(const void *key, const void *base,
                                  size_t *nmemb, size_t size,
                                  int(*compar)(const void *,
                                               const void *));
      #else
          #define _TIFFlfind lfind
      #endif
- In tif_dirinfo.c, replace all lfind() calls to _TIFFlfind()



Cheers,
-Edward