<[EMAIL PROTECTED]> writes:
>First a big "Hello", since I just joined the list.
>
>Now a question, I am putting a XS wrapper over a 'C' library
>we have.  The header files have defined types, in paticular 
>'#define LLONG long long', when I compile the module, I get
>a parse error for a header file that contains a structure that
>uses the "LLONG" type.  

That should work for XS code itself, but h2xs may be upset.
(Personally I never use h2xs - I always write XS by hand...)

How about using a typedef instead of a #define 

#if HAS_LONG_LONG
typedef long long LLONG;
#else
typedef i64 LLONG;
#endif

Have you #include-d the header in the .xs file?
When you say you "get a parse error" from what? xsubpp, or C compiler or perl?
or "h2xs"? 

>I was able to get it to compile by 
>changing the LLONG to "long long", but I want to use the #define
>since it is different for our different arch.  Do I need to have
>a constant function for the #define?  I believe you only need the
>constant funcs if the #define needs to be accessible by perl user,
>right??
>
>                            Thanks,
>                                  STH
>
>----------------------------------
>E-Mail: [EMAIL PROTECTED]
>Date: 30-Jan-2003
>Time: 09:16:44
>----------------------------------
-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/

Reply via email to