compiling /sage_c_lib-2.1.4

the problem:
In file included from 
/opt2/local/sage-2.1.4/local/include/python2.5/Python.h:8,
from src/stdsage.h:35,
from src/interrupt.c:13:
/opt2/local/sage-2.1.4/local/include/python2.5/pyconfig.h:917:1: 
warning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/stdio.h:22,
from src/interrupt.c:12:
/opt2/local/encap/gcc-4.1.2/bin/../lib/gcc/sparc-sun-solaris2.10/4.1.2/include/sys/feature_tests.h:197:1:
 
warning: this is the location of the previous definition

the reason:
in feature_tests.h:
"* In the 32-bit environment, the default value is 32; if not set, set it to
* the default here, to simplify tests in other headers.
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS       32
"
in pyconfig.h:
#define _FILE_OFFSET_BITS 64

the "solution":
in src/interrupt.c
change
#include <stdio.h>
#include "stdsage.h"
#include "interrupt.h"
to
#include "stdsage.h"
#include "interrupt.h"
#include <stdio.h>




problem 2

src/interrupt.h:147: error: expected specifier-qualifier-list before 
'typedef'
the solution:
on line 93
struct sage_signals {
   [.....]
    #elif defined (__sun__) || defined (__sun)   /* Solaris */
    typedef void (*__sighandler_t )();
    [...]
   }  

change to

typedef void (*__sighandler_t )();
struct sage_signals {
   [.....]
    #elif defined (__sun__) || defined (__sun)   /* Solaris */
    [...]
   }
   In other words, move the typedef  out from the definition of the struct.

   Then it compiles. Whether it's RIGHT or not, who knows.

   Solaris 10 gcc 4.1.2


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to