MAGIC Magic Mailing List
 
 

From: Jake Hill (jah AT alien DOT bt.co.uk)
Date: Fri Jan 09 2004 - 08:21:04 EST

  • Next message: Duncan.coutler: "Hi how are you?"

    R. Timothy Edwards wrote:
    > 
    >    A quick grep of the source suggests that the problem is that
    > file magic/tclmagic.c should have a line #include <errno.h>.  I
    > would guess that the use of errno in tclmagic.c, line 904 without
    > reference to any external variable is causing the problem.  Most
    > compilers probably either recognize errno as a system global
    > variable or else most systems are set up to include errno.h
    > somewhere along the way.  I think gcc-3 stopped all this helpful
    > behavior.
    
    Yes, that'll be it. Quite dumb of me not to have looked for a tclmagic.c.
    
    Anyway, I think using errno in this way is not safe with NPTL (i.e. 
    errno is no longer plain extern int). It used to result in a warning 
    with the 2.6 series kernel, but it's stopped working altogether in the 
    later glibc versions.
    
    All fixed after I added #include <errno.h> near the top of the file.
    
    Cheers,
    
    /.J
    


  •  
     
    Questions? Contact Rajit Manohar
    cornell logo