Menu

#111 malloc.h isn't portable

v1.0 (example)
closed-fixed
nobody
qalc (14)
5
2010-01-22
2010-01-21
No

malloc() and related functions moved to stdlib.h many years ago in many (most? all?) standard unix-like systems, and some (for example, OS X) don't even ship the old malloc.h file at all any more. That can make libqalculate-0.9.7/src/qcalc.cc unbuildable. I think stdlib.h is sufficient to use on all systems, but if there are some that need malloc.h, you could use autoconf macro to see which is available and then protect the #include in qcalc.cc with #ifdef based on the config.h tokens.

Discussion

  • Matteo

    Matteo - 2010-01-22
    • status: open --> closed-fixed
     
  • Matteo

    Matteo - 2010-01-22

    Switched to stdlib. Thanks for pointing this out.

     

Log in to post a comment.