Ticket #8846: trac_8846-fix_partitions.patch

File trac_8846-fix_partitions.patch, 1.1 KB (added by Mike Hansen, 12 years ago)
  • sage/combinat/partitions_c.cc

    # HG changeset patch
    # User Mike Hansen <mhansen@gmail.com>
    # Date 1272890292 25200
    # Node ID f12195e922ac67b485b06ee0f9e3abe9d40a0b16
    # Parent  0c6102653125a039fb59acb35330d89f2ede8b8a
    Trac #8846: fix partitions in Cygwin
    
    diff -r 0c6102653125 -r f12195e922ac sage/combinat/partitions_c.cc
    a b  
    8686
    8787#define USE_DD_QD 0
    8888
    89 #if defined(__sun)
     89#if defined(__sun) || defined(__CYGWIN__)
    9090extern "C" long double fabsl (long double);
    9191extern "C" long double sinl (long double);
    9292extern "C" long double cosl (long double);
     
    9595extern "C" long double sinhl (long double);
    9696#endif
    9797
    98 
    99 
    100 
    10198#include <stdio.h>
    10299#include <cfloat>
    103100
     
    154151const unsigned int double_precision = DBL_MANT_DIG;                         // The assumed precision of a double.
    155152
    156153
    157 #ifdef __sparc
     154#if defined(__sparc) || defined(__CYGWIN__)
    158155// On sparc solaris long double is bad/broken/different, etc.  E.g.,
    159156// LDBL_MANT_DIG is 113 rather than 106, which causes all kinds of trouble.
    160157// So we only use double_precision.