Grüße.
I would like to debug your problem, so as always, I ask for access to
your machine. I can send my ssh public key.
>>>> "Falk" == Falk Hueffner
<falk.hueffner(a)student.uni-tuebingen.de> writes:
Falk> Hi,
Falk> with xemacs-21.2 CVS from October 12 and Compaq C V6.2-504 I get
Falk> [...]
Falk> checking for working alloca.h... no
Falk> checking for alloca... no
Falk> Defining C_ALLOCA
Falk> checking whether alloca needs Cray hooks... no
Falk> checking stack direction for C alloca... -1
Falk> Defining STACK_DIRECTION = -1
Falk> xemacs will be linked with "alloca.o"
Falk> [...]
Falk> The reason is that ccc won't find alloca when linking if passed
Falk> "-std1", which is added by xemacs configure. (ccc picks up gcc's
Falk> alloca.h, but the alloca.h check wants to link, too, so it fails.)
I was the one who added that '-std1', which works fine on Tru64 with
cc (cc)
Digital UNIX Compiler Driver 3.11
DEC C V5.8-009 on Digital UNIX V4.0 (Rev. 1091)
Falk> Then when building one gets lots of warnings:
Falk> ccc -O3 -Demacs -I. -I../src -I/usr/local/src/xemacs-21.2-10.12/lib-src
-I/usr/local/src/xemacs-21.2-10.12/src -DHAVE_CONFIG_H -std1
/usr/local/src/xemacs-21.2-10.12/lib-src/wakeup.c -ldb -lgpm -lncurses -L/usr/lib -lesd
-laudiofile -lm -lm -lutil -lgcc -lc -lgcc /usr/lib/crtn.o -o wakeup
Falk> cc: Warning: /usr/include/alloca.h, line 33: In this declaration, the type of the
function "alloca", declared in a system header file, is not compatible with the
earlier declaration of "alloca" at line number 43 in file ../src/config.h.
(funcredeclext1)
Falk> extern __ptr_t alloca __P ((size_t __size));
Falk> ---------------^
It seems C_ALLOCA could use some work. For starters, it should be ANSIfied.
Falk> (__ptr_t is a #define for void *, while config.h declares the return
Falk> value as char *)
Falk> Finally, it fails:
Falk> ccc -c -O3 -Demacs -I. -I../src -I/usr/local/src/xemacs-21.2-10.12/lib-src
-I/usr/local/src/xemacs-21.2-10.12/src -DHAVE_CONFIG_H -std1
/usr/local/src/xemacs-21.2-10.12/lib-src/../src/alloca.c
Falk> cc: Error: /usr/local/src/xemacs-21.2-10.12/lib-src/../src/alloca.c, line 191: In
this declaration, the type of "alloca" is not compatible with the type of a
previous declaration of "alloca" at line number 43 in file ../src/config.h.
(notcompat)
Falk> alloca (size)
Falk> ^
Falk> because alloca.c declares alloca as returning "pointer", which is
Falk> typedefed to void *.
Falk> Now I wonder how to fix this best; one could for example:
Falk> * remove -std1 from the ccc flags
No.
Falk> * use something like
Falk> #if defined(__DECC) && defined(__linux__)
Falk> # include <machine/builtins.h>
Falk> # define alloca __ALLOCA
Falk> #endif
Falk> which also works with -std1
I would prefer a configure test for __ALLOCA, and add some logic to
use __ALLOCA the top of src/config.h.in.
Falk> * consistentialize xemacs' declarations; regex.c also wants to declare
Falk> alloca as returning char *.
Yes. But it's hard for me to make these kinds of changes without
access to your system.
Falk> And if anybody feels a bit bored, here are a few interesting warnings:
These are fantastic warnings. What a great compiler! I'll fix miscplay.c.
Falk> cc: Warning: miscplay.c, line 384: In this statement, the expression
"*dest++=(unsigned char)(((int)*((signed char ...)(src++))+(int)*((signed char
...)(src++)))/2)" modifies the variable "src" more than once without an
intervening sequence point. This behavior is undefined. (undefvarmod)
Falk> *dest++ = (unsigned char)(((int)*((signed char *)(src++)) +
Falk> ----^
Falk> cc: Warning: miscplay.c, line 405: In this statement, the expression
"*dest++=(unsigned char)(((int)*((signed char ...)(src++))+(int)*((signed char
...)(src++)))/2)^0X0000000000000080" modifies the variable "src" more than
once without an intervening sequence point. This behavior is undefined. (undefvarmod)
Falk> *dest++ = (unsigned char)(((int)*((signed char *)(src++)) +
Falk> ----^
Falk> cc: Warning: miscplay.c, line 496: In this statement, the expression
"*p++=ulaw_dsp[*p]" modifies "p", and fetches its value in a
computation that is not used to produce the modified value without an intervening sequence
point. This behavior is undefined. (undefvarfetch)
Falk> *p++ = ulaw_dsp[*p];
Falk> ----^
Falk> cc: Warning: miscplay.c, line 570: In this statement, the expression
"*p++=((*p&0X00000000000000FF)<<8)|(*p>>8)" modifies
"p", and fetches its value in a computation that is not used to produce the
modified value without an intervening sequence point. This behavior is undefined.
(undefvarfetch)
Falk> *p++ = ((*p & 0x00ff) << 8) | (*p >> 8);
Falk> ----^
Falk> cc: Warning: miscplay.c, line 570: In this statement, the expression
"*p++=((*p&0X00000000000000FF)<<8)|(*p>>8)" modifies
"p", and fetches its value in a computation that is not used to produce the
modified value without an intervening sequence point. This behavior is undefined.
(undefvarfetch)
Falk> *p++ = ((*p & 0x00ff) << 8) | (*p >> 8);
Falk> ----^
I'd like to fix the next two, but I think I'd like the help of your
wonderful compiler to track down the stuff in the preprocessor magic.
Or you could try doing this if you'd like to help with the hacking.
Falk> cc: Warning: regex.c, line 5627: This statement uses the type "union
declared without a tag" to reference the same storage location as the statement at
line number 5627 in file regex.c, which uses the type "long". This does not
conform to the ANSI aliasing rules. (badansialias)
Falk> POP_FAILURE_POINT (d, p,
Falk> ----------^
Falk> cc: Warning: regex.c, line 5312: This statement uses the type "union
declared without a tag" to reference the same storage location as the statement at
line number 5312 in file regex.c, which uses the type "long". This does not
conform to the ANSI aliasing rules. (badansialias)
Falk> POP_FAILURE_POINT (sdummy, pdummy,
Falk> ------------^
Martin