Changeset 634

Show
Ignore:
Timestamp:
06/28/07 00:50:37 (1 year ago)
Author:
Gregor
Message:

rebuild/constfold.c, rebuild/link.c: Should now compile on FreeBSD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docs/ChangeLog

    r633 r634  
    22        - Rebuild: Fixed generation of libraries with DMD+GNU/Linux (see ticket 
    33          #75). 
     4        - Rebuild: Should now compile on FreeBSD (see ticket #82). 
    45 
    560.66 from 0.65: 
  • trunk/rebuild/constfold.c

    r522 r634  
    3434 
    3535#define LOG 0 
     36 
     37/* FreeBSD Workaround */ 
     38#if defined(__FreeBSD__) 
     39           long double 
     40           fmodl (long double x, long double y) 
     41           { 
     42               long double ax, ay; 
     43 
     44               if (y == 0) 
     45                 return 0; 
     46 
     47               ay = fabsl (y); 
     48               ax = fabsl (x); 
     49 
     50               if (ax < ay) 
     51                 return x; 
     52 
     53               return copysignl(ax - (floorl (ax / ay)) * ay, x); 
     54           } 
     55#endif 
    3656 
    3757Expression *expType(Type *type, Expression *e) 
     
    487507        c = complex_t(e1->toReal() % r2, e1->toImaginary() % r2); 
    488508#else 
     509 
    489510        c = complex_t(fmodl(e1->toReal(), r2), fmodl(e1->toImaginary(), r2)); 
    490511#endif 
  • trunk/rebuild/link.c

    r522 r634  
    2828#if _WIN32 
    2929#include    <process.h> 
    30 #endif 
    31  
    32 #if linux 
     30#else 
     31 
    3332#include    <sys/types.h> 
    3433#include    <sys/wait.h>