Changeset bebd13f in git for factory/imm.h


Ignore:
Timestamp:
Nov 8, 2013, 10:18:53 AM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
35c26414eab02dda7305d2a199bc7a351daf705d
Parents:
13f7b2794703c329b4c6179ef9db9eb16b305824fd6816507d9d8040e8379a880a5d36da704d9da1
Message:
Merge pull request #417 from jankoboehm/spielwiese

Fixed name conflict INT64 and wrong type (windows port)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/imm.h

    r13f7b2 rbebd13f  
    3333
    3434/* define type of your compilers 64 bit integer type */
    35 #ifndef INT64
    36 #define INT64 long long int
     35#ifndef FACTORY_INT64
     36#define FACTORY_INT64 long long int
    3737#endif
    3838
     
    4646
    4747#if defined(WINNT) && ! defined(__GNUC__)
    48 const INT64 MINIMMEDIATELL = -268435454i64;
    49 const INT64 MAXIMMEDIATELL = 268435454i64;
     48const FACTORY_INT64 MINIMMEDIATELL = -268435454i64;
     49const FACTORY_INT64 MAXIMMEDIATELL = 268435454i64;
    5050#else
    51 const INT64 MINIMMEDIATELL = -268435454LL;
    52 const INT64 MAXIMMEDIATELL = 268435454LL;
     51const FACTORY_INT64 MINIMMEDIATELL = -268435454LL;
     52const FACTORY_INT64 MAXIMMEDIATELL = 268435454LL;
    5353#endif
    5454
     
    303303    long b = imm2int( rhs );
    304304    int sa= 1;
    305     unsigned INT64 aa, bb;
     305    unsigned FACTORY_INT64 aa, bb;
    306306    if (a < 0)
    307307    {
    308308      sa= -1;
    309       aa= (unsigned INT64) (-a);
    310     }
    311     else
    312       aa= (unsigned INT64) a;
     309      aa= (unsigned FACTORY_INT64) (-a);
     310    }
     311    else
     312      aa= (unsigned FACTORY_INT64) a;
    313313    if (b < 0)
    314314    {
    315315      sa= -sa;
    316       bb= (unsigned INT64) (-b);
    317     }
    318     else
    319       bb= (unsigned INT64) b;
    320     unsigned INT64 result = aa*bb;
     316      bb= (unsigned FACTORY_INT64) (-b);
     317    }
     318    else
     319      bb= (unsigned FACTORY_INT64) b;
     320    unsigned FACTORY_INT64 result = aa*bb;
    321321    #if SIZEOF_LONG == 4
    322     if (result>(unsigned INT64)MAXIMMEDIATE)
     322    if (result>(unsigned FACTORY_INT64)MAXIMMEDIATE)
    323323    {
    324324        InternalCF * res = CFFactory::basic( IntegerDomain, a, true );
     
    326326    }
    327327    #else
    328     if ( ( a!=0L ) && ((result/aa!=bb) || (result>(unsigned INT64) MAXIMMEDIATE) ))
     328    if ( ( a!=0L ) && ((result/aa!=bb) || (result>(unsigned FACTORY_INT64) MAXIMMEDIATE) ))
    329329    {
    330330        InternalCF * res = CFFactory::basic( IntegerDomain, a, true );
Note: See TracChangeset for help on using the changeset viewer.