[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problem with have_struct_member

djberg96

3/24/2005 3:23:00 PM

Hi all,

Ruby 1.8.2
Solaris 9

For some reason this is returning false:

have_struct_member("struct lastlog", "ll_time", "lastlog.h")

Yet, there is a lastlog.h in /usr/include and the lastlog struct is
defined as follows:

struct lastlog {
#ifdef _LP64
time32_t ll_time;
#else
time_t ll_time;
#endif
char ll_line[8];
char ll_host[16]; /* same as in utmp */
};

I made sure that it could actually see the lastlog.h file by calling
'have_header("lastlog.h")' which returned true.

I also did a sanity check by trying a different struct and struct
member:

have_struct_member("struct passwd", "pw_gecos", "pwd.h")

This returned true as well.

What am I doing wrong?

Regards,

Dan

1 Answer

ts

3/24/2005 3:34:00 PM

0

>>>>> "D" == Daniel Berger <djberg96@hotmail.com> writes:


Try it with

D> have_struct_member("struct lastlog", "ll_time", "lastlog.h")

have_struct_member("struct lastlog", "ll_time", ["time.h", "lastlog.h"])

D> struct lastlog {
D> #ifdef _LP64
D> time32_t ll_time;
D> #else
D> time_t ll_time;
^^^^^^

here the problem

D> #endif
D> char ll_line[8];
D> char ll_host[16]; /* same as in utmp */
D> };



Guy Decoux