Niels M?ller wrote:
>
> Kimball Thurston <[EMAIL PROTECTED]> writes:
>
> > Adding AC_C_INLINE to configure.in will automatically add a #define for
> > the appropriate inline... and a line in config.h.in. Oh, you mention
> > that below. I haven't tried with 0.2.7 - before ( 0.2.3 or somewhere
> > around there ) didn't have the AC_C_INLINE in the configure.
>
> I have it in my sources here, but I can't say for sure if it got in
> 0.2.7. Anyway, it would be nice if you could add that to your
> configure.in (if it isn't there already) and tell me if that solves
> the problem.
It worked fine for me with 0.2.7... In fact, the only two things I had
to change were the STRSIGNAL define in lsh_types.h which Gabe previously
sent a fix for and the N_ macro not being able to assign to a char foo[]
in argp-parse.c at line 807... and I cleaned it up by doing the
following:
--- lsh-0.2.7/src/argp/argp-parse.c Wed Feb 2 14:59:54 2000
+++ mylsh-0.2.7/src/argp/argp-parse.c Fri Feb 4 12:57:20 2000
@@ -56,7 +56,12 @@
# define dgettext(domain, msgid) (((void) (domain), (msgid)))
# define gettext(msgid) (((void) (domain), (msgid)))
#endif
-#define N_(msgid) (msgid)
+#ifdef gettext_noop
+#define N_(msgid) gettext_noop(msgid)
+#else
+#define N_(msgid) msgid
+#endif
+
#endif
#if __GNUC__ && HAVE_GCC_ATTRIBUTE
The major change is that I got rid of the parens around msgid in the
degenerate case when gettext_noop is NOT defined - I had seen
gettext_noop used elsewhere, so thought it might be useful here... I
don't know why the SGI compiler doesn't like parens and char foo[], but
allows it with char *foo. Strange.
As for when I run it, it crashes in lsh_object_check_subtype:
0 _kill(0x5a5ec, 0x6, 0x0, 0x0, 0x1, 0x2, 0x7fff2cc0, 0x0)
["/xlv51/6.5.5f/work/irix/lib/libc/libc_n32_M4/signal/kill.s":15,
0xfacb908]
1 _raise(0x5a5ec, 0x6, 0x0, 0x0, 0x1, 0x2, 0x7fff2cc0, 0x0)
["/xlv51/6.5.5f/work/irix/lib/libc/libc_n32_M4/signal/raise.c":27,
0xfacc284]
2 abort(0x5a5ec, 0x6, 0x0, 0x0, 0x1, 0x2, 0x7fff2cc0, 0x0)
["/xlv51/6.5.5f/work/irix/lib/libc/libc_n32_M4/gen/abort.c":52,
0xfa3bc00]
3 fatal(0x10091ef8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
["/usr2/Freeware/lsh-0.2.7/src/werror.c":492, 0x1003bf18]
4 lsh_object_check_subtype(0x1009b058, 0x100a1528, 0x0, 0x0, 0x1,
0x0, 0x7fff2cc0, 0x0) ["/usr2/Freeware/lsh-0.2.7/src/xalloc.c":266,
0x100368c4]
5 gaba_apply(0x100a1528, 0x100c7280, 0x0, 0x0, 0x1, 0x2, 0x7fff2cc0,
0x0) ["/usr2/Freeware/lsh-0.2.7/src/command.c":95, 0x1002132c]
6 make_lsh_connect(0x100c7228, 0x100c7280, 0x100a3db0, 0x100c72c0,
0x1, 0x2, 0x7fff2cc0, 0x0) ["/usr2/Freeware/lsh-0.2.7/src/lsh.c.x":144,
0x1001347c]
7 main(0x4, 0x7fff2ed4, 0x0, 0x0, 0x1, 0x2, 0x7fff2cc0, 0x0)
["/usr2/Freeware/lsh-0.2.7/src/lsh.c":1068, 0x100159f0]
8 __start()
["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M4/csu/crt1text.s":177,
0x100131e8]
I added a more verbose fatal message, and the class that we are looking
for has an empty name (class->name is empty...) I'm not sure what that
means....
> Testing for -lmalloc should be easy (I'm assuming that malloc() is the
> appropriate function to test for?). As for includes and library
> directories, it is possible to have a list of directories to try in
> configure.in. I.e, first try linking with zlib with no extra flags. If
> that fails, try -L/usr/local/lib, if that fails also, try
> /usr/gnu/lib, etc. If one of the directories works, add it to the
> linker flags. And similarly for include directories.
Whatever - I don't worry about that stuff, as I specify it to make sure
that I know that things are going to compile against the libs I think
they should...
> I think extern inline is the recommended modifiers (from the gcc
> manual) when inline functions are used as macros. But one could add a
> test for that. It should also be possible to conditionalize the
> definitions in the .c file so that they are included iff the functions
> are declared as extern in the header file. At least I think that will
> do the right thing. In libc you actually need both definitions;
> otherwise you get link errors if you try to actually call (rather than
> inline) the function. For instance, if you compile without
> optimization, or if you take the address of the function.
If you look in gmp.h, it has a ifdef block for extern inline - maybe you
could borrow from that, but like I said, thing seemed to be happy, so
I'm not going to worry about it... it may have been from before where
inline wasn't getting properly defined or something...
Oh, another side note, you may want to mention that you need guile and
scsh and m4 for things to work. The first time I downloaded stuff, it
took me a bit to figure out that guile and scsh were needed... (when the
configure was puking...)
later,
--
Kimball
mailto:[EMAIL PROTECTED]
---------------
There is a difference between knowing the path and walking the path.
- Morpheus