Search the web
Sign In
New User? Sign Up
ClearSilver
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Compile ClearSilver on System i   Message List  
Reply | Forward Message #1313 of 1347 |
AW: Compile ClearSilver on System i

After some searching on the web I found that HAVE_LOCKF is queried in
Clearsilver.h. There is seems that ulock, rcfs, dict and skiplist are optional
(are not included if not supported on the system). Is that so? Can I go on with
the rest of the sources?

Thanx for any help in advance

Mihael

-----Ursprüngliche Nachricht-----
Von: ClearSilver@yahoogroups.com [mailto:ClearSilver@yahoogroups.com] Im Auftrag
von Schmidt, Mihael
Gesendet: Freitag, 12. Juni 2009 07:34
An: ClearSilver@yahoogroups.com
Betreff: AW: Compile ClearSilver on System i



oh... it is util/ulocks.c (not util.ulock.c)

I compiled clearsilver on a linux system and took the cs_config.h from it (and
modified it a little bit). Now i see that there is a setting for the
availability of lockf() :

/* Does your system have lockf ? */
/* #define HAVE_LOCKF 1 */

On the linux system there is of course lockf() but not on System i. So I put it
in comments. But it does not seem to do anything. Haven't found anything in
ulocks.c or ulocks.h.

Can I somehow use fcntl() instead of lockf() as a workaround?

Any idea?

Mihael

-----Ursprüngliche Nachricht-----
Von: ClearSilver@yahoogroups.com <mailto:ClearSilver%40yahoogroups.com>
[mailto:ClearSilver@yahoogroups.com <mailto:ClearSilver%40yahoogroups.com> ] Im
Auftrag von Schmidt, Mihael
Gesendet: Freitag, 12. Juni 2009 07:17
An: ClearSilver@yahoogroups.com <mailto:ClearSilver%40yahoogroups.com>
Betreff: AW: Compile ClearSilver on System i

-- Schmidt, Mihael wrote:
> Question: Why is dict.c calling nerr_raise with only 2 parm. Shouldn't
it be
> three parms (error type, format string and error message)? I
definitely got
> something wrong but I don't know what?

nerr_raise() is setup to work like the printf() family of functions. For
example, you might have:

nerr_raise(NERR_ASSERT, "problematic value %d", local_variable_int);

Because the statement you referenced has no % formatting, it has no
arguments.
nerr_raise(NERR_ASSERT, "value or new are NULL");

Mihael: ... and that was my problem. The ILE C compiler expects to have
at least one variable argument if __VA_ARGS__ is used. I added an empty
string and it works now, like:

nerr_raise(NERR_ASSERT, "value or new are NULL", "");

But now I got another problem: The lockf() function is not available on
System i for ILE C. Is there a way to replace this function? A
workaround?

lockf() is used in util/ulock.c, function fLock and fFind.

Any ideas would be great.

Thanx in advance.

Mihael







Fri Jun 12, 2009 5:45 am

Mihael.Schmidt@...
Send Email Send Email

Forward
Message #1313 of 1347 |
Expand Messages Author Sort by Date

Hi, I'm trying to compile ClearSilver on a System i platform. The compiler is C89 compatible (AFAIK). I am compiling the stuff manually, starting with the util...
Schmidt, Mihael
Mihael.Schmidt@...
Send Email
Jun 11, 2009
2:47 pm

I suspect the real problem is with the other macros __PRETTY_FUNCTION, __FILE__ and __LINE__. These are magic macros defined by some compilers, but they might ...
David Jeske
jeskeca
Offline Send Email
Jun 12, 2009
3:08 am

... it be ... definitely got ... nerr_raise() is setup to work like the printf() family of functions. For example, you might have: nerr_raise(NERR_ASSERT,...
Schmidt, Mihael
Mihael.Schmidt@...
Send Email
Jun 12, 2009
5:18 am

oh... it is util/ulocks.c (not util.ulock.c) I compiled clearsilver on a linux system and took the cs_config.h from it (and modified it a little bit). Now i...
Schmidt, Mihael
Mihael.Schmidt@...
Send Email
Jun 12, 2009
5:34 am

After some searching on the web I found that HAVE_LOCKF is queried in Clearsilver.h. There is seems that ulock, rcfs, dict and skiplist are optional (are not...
Schmidt, Mihael
Mihael.Schmidt@...
Send Email
Jun 12, 2009
5:45 am

Yes, they aren't necessary for the template system or cgi code, they're just extra. Brandon ... -- "This universe never did make sense; I suspect it was built...
Brandon Long
blong42
Offline Send Email
Jun 12, 2009
4:34 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help