Re: brat with cygwin

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Tue Jul 29 2003 - 08:33:55 EDT

  • Next message: Hironori Ito: "[Fwd: [Rhic-rcf-l] RCF: Upgrade of rssh04 on Wednesday]"
    Hi Hiro,
    
    Hironori Ito <hito@rcf.rhic.bnl.gov> wrote concerning
      brat with cygwin [Mon, 28 Jul 2003 22:05:12 -0400] 
    ----------------------------------------------------------------------
    > Hello.  I have a question about compiling brat under cygwin.  Now, I
    > was able to get (compile) ROOT with mysql and cernlib under cygwin
    > in gcc.  Then, I tried to compile BRAT.  (Now, don't ask me why I
    > bother with M$ OS.)
    
    It's fun to see just how rotten that OS really is, isn't it? 
    
    > It failed to compile at brat/db/abc/BrDb.h because of undefined 
    > variable "xx". (Flemming already fixed it.)  But, it seemed that my 
    > cygwin compilation is going to the wrong side of if-statement.(???)  I 
    > think cygwin with Intel cpu is still little endian and not big
    > endian.  (or which ever the same as linux in Intel cpu).  Anyhow,
    > here is that code. 
    
    I think so too.
    
    > #if defined(__linux) && defined(__i386__) && defined __GNUC__ && 
    > __GNUC__ >= 2
    > 
    > #else
    > 
    > #endif
    > 
    > Can we change it to
    > 
    > #if (defined(__linux) || (__cygwin))  && defined(__i386__) && defined 
    > __GNUC__ && __GNUC__ >= 2
    > #else
    > #endif
    > 
    > or something like that??? 
    
    A better solution is to use 
    
      AC_C_BIGENDIAN
    
    in `./configure.in', which will define preprocessor macro
    `WORDS_BIGENDIAN' on big endian machines. 
    
    See how wonderful Autotools are :-)
    
    > Also, how (where) thease variables are defined?  I suppose they are
    > obtained (or guessed) from autotool, but I don't know.  Under
    > cygwin, I use the following things
    
    Most of these are defined by the compiler.  Try the `-v' option when
    compiling a simple program: 
    
      > echo "int main() { return 0; }" > foo.cc ; g++ -c -v foo.cc 
     
    > gcc 3.2  
    > aclocal and automake 1.7.5
    > libtoolize 1.5
    > ld 2.13.90
    
    Cool stuff! 
     
    Yours, 
    
     ___  |  Christian Holm Christensen 
      |_| |	 -------------------------------------------------------------
        | |	 Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
         _|	          DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
        _|	          Denmark                    Office: (+45) 353  25 305
     ____|	 Email:   cholm@nbi.dk               Web:    www.nbi.dk/~cholm
     | |
    


    This archive was generated by hypermail 2.1.5 : Tue Jul 29 2003 - 08:36:22 EDT