/[gcl]/gcl/configure.in
ViewVC logotype

Diff of /gcl/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.112.4.1.2.2.2.47.2.3.2.1.4.2.4.2 by camm, Sat Jan 15 19:17:17 2005 UTC revision 1.112.4.1.2.2.2.47.2.3.2.1.4.2.4.2.4.1 by camm, Fri Sep 30 02:19:18 2005 UTC
# Line 287  case $use in Line 287  case $use in
287      *mingw*)      *mingw*)
288          def_statsysbfd="no" ; def_custreloc="yes" ;;          def_statsysbfd="no" ; def_custreloc="yes" ;;
289      powerpc-macosx)      powerpc-macosx)
290          def_statsysbfd="no" ; def_locbfd="yes" ;;          def_statsysbfd="no" ; def_custreloc="yes" ;;
291  esac  esac
292    
293  AC_ARG_ENABLE(dlopen,  AC_ARG_ENABLE(dlopen,
# Line 982  if test "$HAVE_SBRK" = "1" ; then Line 982  if test "$HAVE_SBRK" = "1" ; then
982                    
983          if test "$SBRK" != "$SBRK1" ; then          if test "$SBRK" != "$SBRK1" ; then
984                  AC_MSG_RESULT(yes)                  AC_MSG_RESULT(yes)
985                  AC_MSG_CHECKING([for randomized brk remedy])  #               AC_CHECK_HEADER(linux/personality.h, true,
986    #                          AC_MSG_ERROR(linux/personality.h not found))
987    #               AC_TRY_RUN([#include <syscall.h>
988    #                           #include <linux/personality.h>
989    #                           #include <stdio.h>
990    #                           #include <unistd.h>
991    #                           int main(int argc,char *argv[],char *envp[]) {
992    #                               FILE *f;
993    #                               if (!(f=fopen("conftest1","w")))
994    #                                       return -1;
995    #                               fprintf(f,"%x",ADDR_NO_RANDOMIZE);
996    #                               return 0;
997    #                               }],
998    #                               ADDR_NO_RANDOMIZE=`cat conftest1`,ADDR_NO_RANDOMIZE=0,ADDR_NO_RANDOMIZE=0)
999    #               if test "$ADDR_NO_RANDOMIZE" = "0" ; then
1000    #                       AC_MSG_RESULT(cannot get ADDR_NO_RANDOMIZE constant)
1001    #                       exit 1
1002    #               fi
1003    #               AC_DEFINE_UNQUOTED(ADDR_NO_RANDOMIZE,$ADDR_NO_RANGOMIZE)
1004    #
1005    # Many boxes do not have the definition yet
1006    #
1007                    ADDR_NO_RANDOMIZE=0x40000
1008                    AC_DEFINE_UNQUOTED(ADDR_NO_RANDOMIZE,$ADDR_NO_RANDOMIZE)
1009                    AC_MSG_CHECKING([for ADDR_NO_RANOMIZE constant])
1010                    AC_MSG_RESULT($ADDR_NO_RANDOMIZE)
1011                    AC_CHECK_HEADER(sys/personality.h, true,
1012                               AC_MSG_ERROR(sys/personality.h not found))
1013                  AC_TRY_RUN([#include <syscall.h>                  AC_TRY_RUN([#include <syscall.h>
1014                              #include <linux/personality.h>                              #include <sys/personality.h>
1015                              #include <stdio.h>                              #include <stdio.h>
1016                              #include <unistd.h>                              #include <unistd.h>
1017                              int main(int argc,char * argv[]) {                              int main(int argc,char *argv[],char *envp[]) {
1018                                  FILE *f;                                  FILE *f;
1019                                  #if SIZEOF_LONG == 4                                  long pers;
1020                                  if (!syscall(SYS_personality,PER_LINUX32))                                  pers=personality(-1);
1021                                  #else                                  if (!(pers & ADDR_NO_RANDOMIZE)) {
1022                                  if (!syscall(SYS_personality,PER_LINUX))                                     personality(pers | ADDR_NO_RANDOMIZE);
1023                                  #endif                                     execve(*argv,argv,envp);
1024                                          execvp(argv[0],argv);                                  }
1025                                  if (!(f=fopen("conftest1","w")))                                  if (!(f=fopen("conftest1","w")))
1026                                          return -1;                                          return -1;
1027                                  fprintf(f,"%u",sbrk(0));                                  fprintf(f,"%u",sbrk(0));
# Line 1006  if test "$HAVE_SBRK" = "1" ; then Line 1033  if test "$HAVE_SBRK" = "1" ; then
1033                          exit 1                          exit 1
1034                  fi                  fi
1035                  AC_TRY_RUN([#include <syscall.h>                  AC_TRY_RUN([#include <syscall.h>
1036                              #include <linux/personality.h>                              #include <sys/personality.h>
1037                              #include <stdio.h>                              #include <stdio.h>
1038                              #include <unistd.h>                              #include <unistd.h>
1039                              int main(int argc,char * argv[]) {                              int main(int argc,char * argv[],char *envp[]) {
1040                                  FILE *f;                                  FILE *f;
1041                                  #if SIZEOF_LONG == 4                                  long pers;
1042                                  if (!syscall(SYS_personality,PER_LINUX32))                                  pers=personality(-1);
1043                                  #else                                  if (!(pers & ADDR_NO_RANDOMIZE)) {
1044                                  if (!syscall(SYS_personality,PER_LINUX))                                     personality(pers | ADDR_NO_RANDOMIZE);
1045                                  #endif                                     execve(*argv,argv,envp);
1046                                          execvp(argv[0],argv);                                  }
1047                                  if (!(f=fopen("conftest1","w")))                                  if (!(f=fopen("conftest1","w")))
1048                                          return -1;                                          return -1;
1049                                  fprintf(f,"%u",sbrk(0));                                  fprintf(f,"%u",sbrk(0));
# Line 1027  if test "$HAVE_SBRK" = "1" ; then Line 1054  if test "$HAVE_SBRK" = "1" ; then
1054                          AC_MSG_RESULT(cannot trap sbrk)                          AC_MSG_RESULT(cannot trap sbrk)
1055                          exit 1                          exit 1
1056                  fi                  fi
1057                    AC_MSG_CHECKING([for randomized brk remedy])
1058                  if test "$SBRK" = "$SBRK1" ; then                  if test "$SBRK" = "$SBRK1" ; then
1059                          AC_MSG_RESULT(yes)                          AC_MSG_RESULT(yes)
1060                          AC_DEFINE(NEED_NONRANDOM_SBRK)                          AC_DEFINE(NEED_NONRANDOM_SBRK)
# Line 1048  AC_TRY_RUN([#include <stdio.h> Line 1076  AC_TRY_RUN([#include <stdio.h>
1076              #include <stdlib.h>              #include <stdlib.h>
1077              #ifdef NEED_NONRANDOM_SBRK              #ifdef NEED_NONRANDOM_SBRK
1078                     #include <syscall.h>                     #include <syscall.h>
1079                     #include <linux/personality.h>                     #include <sys/personality.h>
1080                     #include <unistd.h>                     #include <unistd.h>
1081             #endif             #endif
1082  int  int
# Line 1058  main(int argc,char * argv[]) Line 1086  main(int argc,char * argv[])
1086    FILE *fp;    FILE *fp;
1087    
1088  #ifdef NEED_NONRANDOM_SBRK  #ifdef NEED_NONRANDOM_SBRK
1089  #if SIZEOF_LONG == 4    pers=personality(-1);
1090  if (!syscall(SYS_personality,PER_LINUX32))    if (!(pers & ADDR_NO_RANDOMIZE)) {
1091  #else     personality(pers | ADDR_NO_RANDOMIZE);
1092  if (!syscall(SYS_personality,PER_LINUX))     execve(*argv,argv,envp);
1093      }
1094  #endif  #endif
      execvp(argv[0],argv);  
 #endif    
1095    b = (void *) malloc(1000);    b = (void *) malloc(1000);
1096    fp = fopen("conftest1","w");    fp = fopen("conftest1","w");
1097    

Legend:
Removed from v.1.112.4.1.2.2.2.47.2.3.2.1.4.2.4.2  
changed lines
  Added in v.1.112.4.1.2.2.2.47.2.3.2.1.4.2.4.2.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26