> this would be expected due to the pull which sets the mtimes of
> new files to be older than the .8s.  try "mk clean" before proceeding.

i should explain that type signatures are 32-bit
signatures in .$O files that define the type of
external symbols.  the c compiler sets the type
signature to zero unless the -T flag is given.
if both signatures are not zero, the linker
checks to see that they match.

thus if you try to link a.c with decl
        extern int fu;
with b.c
        long fu
it will work perfectly if the -T flag is not
given (since there is a deep assumption
in plan 9 that int == long).  but i the
-T flag is given, it will fail with a type
signature error.

- erik

----
        minooka; cat a.c
        long fu;
        minooka; cat b.c
        #include <u.h>
        #include <libc.h>

        extern int fu;

        void
        main(void)
        {
                print("%d\n", fu);
        }

        minooka; 8c a.c && 8c b.c && 8l a.8 b.8 && 8.out
        0

        minooka; 8c -T a.c && 8c b.c && 8l a.8 b.8 && 8.out
        0

        minooka; 8c a.c && 8c -T b.c && 8l a.8 b.8 && 8.out
        0

        minooka; 8c -T a.c && 8c -T b.c && 8l a.8 b.8 && 8.out
        main: incompatible type signatures 5ef20f47(a.8) and 4151d5bd(b.8) for 
fu


Reply via email to