/[make]/make/main.c
ViewVC logotype

Diff of /make/main.c

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

revision 1.195 by psmith, Thu Feb 10 00:10:57 2005 UTC revision 1.196 by psmith, Wed Feb 16 05:03:42 2005 UTC
# Line 46  MA 02111-1307, USA.  */ Line 46  MA 02111-1307, USA.  */
46  # include <fcntl.h>  # include <fcntl.h>
47  #endif  #endif
48    
49    #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
50    # define SET_STACK_SIZE
51    #endif
52    
53    #ifdef SET_STACK_SIZE
54    # include <sys/resource.h>
55    #endif
56    
57  #ifdef _AMIGA  #ifdef _AMIGA
58  int __stack = 20000; /* Make sure we have 20K of stack space */  int __stack = 20000; /* Make sure we have 20K of stack space */
59  #endif  #endif
# Line 881  main (int argc, char **argv, char **envp Line 889  main (int argc, char **argv, char **envp
889    no_default_sh_exe = 1;    no_default_sh_exe = 1;
890  #endif  #endif
891    
892    #ifdef SET_STACK_SIZE
893     /* Get rid of any avoidable limit on stack size.  */
894      {
895        struct rlimit rlim;
896    
897        /* Set the stack limit huge so that alloca does not fail.  */
898        if (getrlimit (RLIMIT_STACK, &rlim) == 0)
899          {
900            rlim.rlim_cur = rlim.rlim_max;
901            setrlimit (RLIMIT_STACK, &rlim);
902          }
903      }
904    #endif
905    
906    /* Needed for OS/2 */    /* Needed for OS/2 */
907    initialize_main(&argc, &argv);    initialize_main(&argc, &argv);
908    

Legend:
Removed from v.1.195  
changed lines
  Added in v.1.196

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