Eric Wong wrote: > Xeno Campanoli <xeno.campanoli / gmail.com> wrote: >> Okay, I found the sequence in the README. Sorry. It still fails, and I >> tried putting the preprocessor stuff you recommend both before and after >> the two initial includes in the file, with these results: >> >> -mtune=generic -Wall -fno-strict-aliasing -fPIC -c misc.c >> misc.c: In function ¡Ærb_ldap_get_apiinfo¡Ç: >> misc.c:63: warning: implicit declaration of function ¡ÆRARRAY_LEN¡Ç >> misc.c:67: warning: implicit declaration of function ¡ÆRARRAY_PTR¡Ç >> misc.c:67: error: subscripted value is neither array nor pointer >> make: *** [misc.o] Error 1 >> # >> ---snip--- > > OK, we got farther since it's no longer barfing on RSTRING_* > but RARRAY_* instead. > >> I don't see any other of these R.*_ preprocessor functions (well, there >> is an RB.*something, but hopefully) so that maybe if you can give me an >> appropriate #define for that one it might work...???? > > So just add these now, and hopefully there aren't more > incompatibilities.... > > #ifndef RARRAY_PTR > # define RARRAY_PTR(s) (RARRAY(s)->ptr) > #endif > #ifndef RARRAY_LEN > # define RARRAY_LEN(s) (RARRAY(s)->len) > #endif Okay, I put all this stuff into rbldap.h instead of misc.c, as I got the same problem for RARRAY stuff from conn.c. Then I got a compile. I haven't checked to see if it works yet, and I'll post further if it does not, but this is a good step to reply with thanks. > > If upgrading your version of Ruby isn't an option for you, I suggest > grabbing the latest 1.8.7 source and taking any other macros you might > need from the headers. > That is what I will prefer for my stuff, but the whole point of this exercise is to get a fairly standard deliverable on CentOS, so I'll likely need to make a local gem for my deliverable. I will look and see about a 1.9 install, but I'm afraid for these purposes the rbldap.h hack will be more appropriate. Thanks. I will reply with a note on whether this really works. Sincerely, Xeno. -- "It's the preponderance, stupid!" - Professor Stephen Schneider, IPCC member