tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: odd fonts/t1lib compile mystery on osx



On Fri 04 Jan 2019 at 19:25:17 -0500, Chuck Cranor wrote:
> ah, so that t1lib code is a bit shady on its version of abort.
> it does this:
> 
> lib/type1/objects.h:#define   abort(line,no)       t1_abort(line,no)
> 
> so, in theory that macro should rename all abort(line,no) calls
> into t1_abort() and thus not conflict with the posix abort() call.

Could it be that this #define isn't included for all cases where it is
needed? It would have been better if the author had not relied on this
#define, but actually have replaced all cases of abort with t1_abort.
Having even the definition of t1_abort depend on the renaming is really
too lazy.

> I didn't put it in the other message, but I also tried this:
> 
>  - change all 8 calls to abort(line,no) in objects.c to xabort(line,no)
> 
>  - tried this macro:
> 
>      #define xabort(A,B) do { fprintf(stderr, "ABORT!\n"); exit(1); } while (0)

I would have expected it to work at this point, since (if I followed
this correctly) there are no cases of abort() any more that are not the
standard abort().

Maybe t1lib is doing equally silly things with exit()??? Did it print
ABORT!?

>    and the program still crashed.   if I changed it to:
> 
>      #define xabort(A,B) do { fprintf(stderr, "ABORT!\n"); } while (0)
> 
>    then it did not crash (or print "ABORT!\n").

Not crashing sounds good, but that it doesn't print ABORT either is
weird.

I would try (as considered above) to replace ALL cases of abort with
t1_abort, and see if that improves matters. This is something that
should have been done anyway.

> chuck
-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- "What good is a Ring of Power
\X/ rhialto/at/falu.nl      -- if you're unable...to Speak." - Agent Elrond

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index