Greetings, and please excuse the delay in this reply.
I thought this was fixed in the following snippet of 2.6.8pre:
AC_MSG_CHECKING([for ADDR_NO_RANDOMIZE constant])
AC_TRY_RUN([#include <sys/personality.h>
#include <stdio.h>
int main(int argc,char *argv[],char *envp[]) {
FILE *f;
if (!(f=fopen("conftest1","w"))) return -1;
fprintf(f,"%x",ADDR_NO_RANDOMIZE);
return 0;
}],
ADDR_NO_RANDOMIZE=`cat
conftest1`,ADDR_NO_RANDOMIZE=0,ADDR_NO_RANDOMIZE=0)
if test "$ADDR_NO_RANDOMIZE" = "0" ; then
AC_MSG_RESULT([no, assuming 0x40000])
AC_DEFINE_UNQUOTED(ADDR_NO_RANDOMIZE,0x40000)
else
AC_MSG_RESULT([yes, $ADDR_NO_RANDOMIZE])
fi
Is it possible this code is not what you are testing? If it is, could
you please send your configure output?
Take care,
"Andrey G. Grozin" <[email protected]> writes:
> Hello *,
>
> In fact, a conftest program in configure fails due to a syntax
> error. The conftest.c is
>
> #include "confdefs.h"
> #include <syscall.h>
> #include <sys/personality.h>
> #include <stdio.h>
> #include <unistd.h>
> int main(int argc,char *argv[],char *envp[]) {
> FILE *f;
> long pers;
> pers=personality(-1);
> if (!(pers & ADDR_NO_RANDOMIZE)) {
> personality(pers | ADDR_NO_RANDOMIZE);
> execve(*argv,argv,envp);
> }
> if (!(f=fopen("conftest1","w")))
> return -1;
> fprintf(f,"%u",sbrk(0));
> return 0;
> }
>
> confdefs.h contains (among other stuff)
>
> #define ADDR_NO_RANDOMIZE 0x40000
>
> /usr/include/sys/personality.h (which is included later) contains
>
> enum
> {
> ADDR_NO_RANDOMIZE = 0x0040000,
> ....
>
> Here ADDR_NO_RANDOMIZE is replaced by the number 0x40000, and gcc
> (correctly) reports a syntax error.
>
> Any idea how to get rid of this #define in confdefs.h?
>
> Andrey
>
>
>
--
Camm Maguire [email protected]
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
_______________________________________________
Gcl-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gcl-devel