Re: beginnings of a gh_ interface for stk

From: Russ McManus <mcmanr_at_eq.gs.com>
Date: Wed, 30 Apr 1997 08:43:37 -0400

jim-

>>>>> "Jim" == Jim Blandy <jimb_at_cyclic.com> writes:

    Jim> [Russ posted an implementation of the GH interface on top of
    Jim> STk to the STk mailing list. He says:]
>> i know this is a bit late, but i use the following quite
>> effectively. maybe someone can clean it up a little bit and
>> include it in stk.
>>
>> to use this code, #include <gh_extra.h> into your code, and
>> link in gh_extra.o. then one can code with the gh_ api in stk.
>> mostly, anyway.

    Jim> I think it would be very sad to have implementations of GH
    Jim> for many Schemes, but have each one use a different header
    Jim> file. That makes a given file of C code specific not just to
    Jim> GH, but to a specific *implementation* of GH, which kind of
    Jim> defeats the purpose. Folks should be able to write C code
    Jim> that is completely portable between GH implementations.

how about something like the following in gh.h:

#ifndef SCHEME_IMP
#define SCHEME_IMP GUILE
#endif

#if SCHEME_IMP == GUILE

/* normal gh stuff for guile

#elif SCHEME_IMP == STK

/* STk gh stuff

#endif

to build with stk and the gh interface, CFLAGS would have:
-DSTK=1 -DGUILE=2 -DSCHEME_IMP=STK

this is very similar to my current arrangement for building
with both stk and guile. it's not industrial strength, but
it works. at some earlier time, i used cpp assertions, but
i had to drop back to simple preprocessor defines because
sparcworks cpp does not have assertions. thus the -DSTK=1
-DGUILE=2 kludge.

    Jim> A solution should permit people to have multiple
    Jim> implementations of GH installed simultaneously --- i.e. both
    Jim> STk and Guile. I guess which implementation you wanted would
    Jim> need to be specified by a command-line #define or something.

see above suggestion.

-russ

-- 
Russell D. McManus             phone: 212-357-4901
Goldman, Sachs & Co.            beep: 917-556-0708
Intl. Equities Technology
Received on Wed Apr 30 1997 - 14:42:43 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST