AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2005

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

2005.06.21 14:53 "VS7.1 compile problems", by Thom Decarlo
2005.06.21 15:11 "Re: VS7.1 compile problems", by Bob Friesenhahn
2005.06.21 16:10 "Re: VS7.1 compile problems", by Edward Lam
2005.06.21 16:44 "Re: VS7.1 compile problems", by Bob Friesenhahn
2005.06.22 20:51 "Re: VS7.1 compile problems", by Andrey Kiselev
2005.06.23 12:44 "Re: VS7.1 compile problems", by Thom Decarlo
2005.06.23 19:11 "Re: VS7.1 compile problems", by Andrey Kiselev

2005.06.21 16:10 "Re: VS7.1 compile problems", by Edward Lam

Bob Friesenhahn wrote:
> On Tue, 21 Jun 2005, Thom DeCarlo wrote:
> > Problem 1: There is something flaky about the handling of the inline
> > declaration in tif_fax3.c functions find0span and find1span. I had to
> > comment out the word "inline" on lines 779 and 838 to get the file to
> > compile.
> 
> VC++ uses '__inline' so adding the define
> 
> #define inline __inline
> 
> should fix the compile problem.  Of course this needs to be
> conditional on the compiler.

Isn't this because we're trying to compile that file as C code as opposed to C++ 
code? The "inline" keyword is available in the C++ language only. What do we do 
with gcc? Does gcc erroneously allow the "inline" keyword in the C language?

I think a more semantically correct fix would be:
   #if defined(__cplusplus)
     // use prototype with inline
   #else
     // use prototype without inline
   #endif

Regards,
-Edward