libextractor
[Top][All Lists]
Advanced

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

Re: [libextractor] libextractor and Solaris 10


From: Christian Grothoff
Subject: Re: [libextractor] libextractor and Solaris 10
Date: Wed, 5 Apr 2006 00:53:37 -0700
User-agent: KMail/1.9.1

On Monday 27 March 2006 04:41, Michał Kowalczuk wrote:
> Hello,
>
> I needed to compile libextractor-0.5.11 on Solaris 10. There is a problem
> with function dateToString in file src/plugins/wordleaker/wordextractor.cc
> (use of strndup() function, which is glibc-specific and doesn't exist on
> Solaris). Because strftime() already prepares string, that has maximum 128
> characters, I think that use of strndup() is not neccesary, so you can
> simply return strdup(f), which is Solaris compatible. :)

Should be fixed in SVN by now ;-).

> Another hint is that to compile libextractor under Solaris, you need to use
> -D_POSIX_PTHREAD_SEMANTICS CFLAG, because without it ctime_r() has
> following prototype:
> char *ctime_r(const time_t *clock, char *buf, int buflen);
> instead of:
> char *ctime_r(const time_t *clock, char *buf);

I'll be happy to change the configure script to do this (please let me know if 
it (still) does not work). Alternatively, I guess 

#ifdef SOLARIS
      char * ret = ctime_r((time_t *) &t, (char*)malloc(32), 32);
#else
      char * ret = ctime_r((time_t *) &t, (char*)malloc(32));
#endif
 
might be a modification that should also work -- but I guess the -D flag is 
nicer.

> After applying those two fixes libextractor successfully compiled on
> Solaris 10. :) Thanks for a good piece of Open Source software. :D

Thanks!

Christian




reply via email to

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