discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Re: [Commit-gnuradio] r10410 -gnuradio/trunk/gnur


From: Michael Dickens
Subject: Re: [Discuss-gnuradio] Re: [Commit-gnuradio] r10410 -gnuradio/trunk/gnuradio-core/src/lib/missing
Date: Tue, 10 Feb 2009 10:32:44 -0500

On Feb 10, 2009, at 10:11 AM, Don Ward wrote:
Oops, this is my mistake. I should have seen that valloc() is supposed to be in <stdlib.h> (but isn't there in Cygwin). Thanks for fixing this.

I'm worried, though, that valloc isn't available at all on MinGW. Is there another way to accomplish what is needed?


The standard way of dealing with most #include's is to have AC check them in configure.ac to see if they exist (e.g., "AC_CHECK_HEADERS(malloc.h malloc/malloc.h stdlib.h)") then #ifdef around the #include to make it safe (e.g.:

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif

). With enough of these, one can usually find the correct header files and routines for a given OS. If more than a few of these are required to find a given header / routine, then the user's code will generally be cleaner if all of this is moved to a common local header file which is then #include'd (e.g., as done for the posix_memalign () function).

Do you know what MinGW requires to get posix_memalign.cc to compile and be usable? - MLD




reply via email to

[Prev in Thread] Current Thread [Next in Thread]