[osol-code] memalign(size_t alignment, size_t size); ?

2012-09-20 Thread Dennis Clarke
I *must* be doing something epic wrong here. However : $ $ cat -n memalign_test.c 1 #define _POSIX_SOURCE 1 2 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 11 int main(int argc, char *

Re: [osol-code] memalign(size_t alignment, size_t size); ?

2012-09-20 Thread Garrett D'Amore
On Sep 20, 2012, at 7:26 PM, Dennis Clarke wrote: > > So I went and looked at > http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libbc/libc/gen/common/memalign.c > to see, what bloody obvious thing I am doing wrong[1]. Perhaps alignment > means bytes and I should have 8 ther

Re: [osol-code] memalign(size_t alignment, size_t size); ?

2012-09-20 Thread Darryl Gove
Hi, Thanks for the fun question :) The problem is that _POSIX_SOURCE 1 means that memalign() doesn't get defined. You're using -erroff=%all which suppressed the warning message. Here's a short example: #define _POSIX_SOURCE 1 #include #include int main() { char * buffer; printf("%i\n"

Re: [osol-code] memalign(size_t alignment, size_t size); ?

2012-09-20 Thread Dennis Clarke
> Hi, > > Thanks for the fun question :) Well I figured this was way way to trivial a test to go wrong here and be damned if I could see what my problem was. I just, you know, had to post this thing and hope no one came back and said "found the problem, you're an idiot!" :-) > The problem i