Bug 687728 - type conflicts in ttfsfnt.h
Summary: type conflicts in ttfsfnt.h
Status: RESOLVED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: master
Hardware: Other AIX
: P2 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-05 03:32 UTC by Igor Melichev
Modified: 2010-09-23 09:59 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Melichev 2004-10-05 03:32:00 UTC
This moved from "Comment #2 From Dan Coby" of the bug 687723.
There is 'int32' type conflict on AIX in ttfsfnt.h, and maybe with other types 
in same module.

We don't like the substitution s/int32/int32_t because, it dramatically changes 
the coding style of modules copied from FreeType : after this change 
text 'diff' won't work for us. Also wouldn't it affect the license agreenment 
agreement ?
Comment 1 Ralph Giles 2004-10-05 11:34:05 UTC
We purchased rights to the freetype 1 code that has been incorporated in
Ghostscript; there are no issues with the license. (Nor would there be if we
were using it under the public license.)

You can investigate how freetype works around this portability problem, but I
don't see that we have much choice here. Other parts of ghostscript do need the
types, and the conflict must be resolved.
Comment 2 Igor Melichev 2004-10-05 12:09:46 UTC
Ralph,

I strongly against global changes through FreeType code. Besides others, it is 
harmful for maintenance. Since int32 is already defined in AIX, I'd suggest to 
wrap the conflicting definition with #ifndef ...#ebdif, using a macro 
designating the AIX compiler. Hopely it defines a specific macro. Or a better 
way is to use ./configure.
Comment 3 Ralph Giles 2004-10-06 07:34:09 UTC
Platform #ifdefs in regular source files violates C-style. This could be fixed
with additional configure/stdint_.h gymnastics, but I don't see why we can't
just change the fixed types in the code. Why do you need to diff against the
original freetype source?
Comment 4 Igor Melichev 2004-10-11 10:53:03 UTC
I use a diff against the original freetype source code to know what I changed 
in ther. It frequently helps to debugging.
Comment 5 Hin-Tak Leung 2005-06-08 19:04:06 UTC
Could not find the origin of the file ttfsfnt.h - it contains a
1991 Apple Copyright comment, rather than the usual freetype copyright 
headers. I think the file cames from some Apple truetype reference 
sample code originally? Current freeype 1 or 2 does not contain anything 
with an Apple Copyright comment.
Comment 6 Masaki Ushizaka 2009-08-06 00:31:42 UTC
Is this still an issue?  Can't we build ghostscript on AIX?
Comment 7 Ken Sharp 2009-08-06 01:20:07 UTC
Since we don't have an AIX machine, we can't build GS for AIX. I believe we do
have someone who builds AIX but I don't know what changes they make.

As regards the suggestion of changing the FreeType code, I'm personally pretty
happy with the global change. Its pretty unlikely that I'll ever do the kind of
'diff' that Igor refers to. I'm not the one who made the original port so such a
global diff wouldn't help me.
Comment 8 Ken Sharp 2010-08-11 07:23:22 UTC
Since Marcos is currently looking at build problems on AIX I'm assigning this one to him. 

Marcos feel free to send it back, but please let me know how you are compiling this on AIX. I am (comment #7) happy with changing the type declaration, especially since we will eventually stop using this code altogether.
Comment 9 Ken Sharp 2010-08-11 17:38:43 UTC
re-assigned back to me, Marcos is working on an old (circa 1999) AIX 4 installation. Presumably this is an issue only with newer versions of AIX.
Comment 10 Ken Sharp 2010-09-23 09:59:19 UTC
This does not appear to cause any problems with AIX 4 or 5.2 when using gcc. The original thread (#687723) does not specify a toolchain or an AIX version.

Since we are unable to reproduce a problem, and eventually we intend this file to go away anyway, I'm closing this as 'worksforme'.