commit bash-20051123 snapshot
[platform/upstream/bash.git] / d1b
1 *** ../bash-2.05b-patched/aclocal.m4    Tue Jun 25 09:45:43 2002
2 --- aclocal.m4  Sat Oct  9 15:03:28 2004
3 ***************
4 *** 686,691 ****
5   
6   AC_DEFUN(BASH_FUNC_GETCWD,
7 ! [AC_MSG_CHECKING([if getcwd() calls popen()])
8 ! AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
9   [AC_TRY_RUN([
10   #include <stdio.h>
11 --- 686,691 ----
12   
13   AC_DEFUN(BASH_FUNC_GETCWD,
14 ! [AC_MSG_CHECKING([if getcwd() will dynamically allocate memory])
15 ! AC_CACHE_VAL(bash_cv_getcwd_malloc,
16   [AC_TRY_RUN([
17   #include <stdio.h>
18 ***************
19 *** 694,748 ****
20   #endif
21   
22 - #ifndef __STDC__
23 - #ifndef const
24 - #define const
25 - #endif
26 - #endif
27
28 - int popen_called;
29
30 - FILE *
31 - popen(command, type)
32 -      const char *command;
33 -      const char *type;
34 - {
35 -       popen_called = 1;
36 -       return (FILE *)NULL;
37 - }
38
39 - FILE *_popen(command, type)
40 -      const char *command;
41 -      const char *type;
42 - {
43 -   return (popen (command, type));
44 - }
45
46 - int
47 - pclose(stream)
48 - FILE *stream;
49 - {
50 -       return 0;
51 - }
52
53 - int
54 - _pclose(stream)
55 - FILE *stream;
56 - {
57 -       return 0;
58 - }
59
60   main()
61   {
62 !       char    lbuf[32];
63 !       popen_called = 0;
64 !       getcwd(lbuf, 32);
65 !       exit (popen_called);
66   }
67 ! ], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
68 !    [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
69 !     bash_cv_getcwd_calls_popen=no]
70   )])
71 ! AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
72 ! if test $bash_cv_getcwd_calls_popen = yes; then
73   AC_DEFINE(GETCWD_BROKEN)
74   AC_LIBOBJ(getcwd)
75 --- 694,709 ----
76   #endif
77   
78   main()
79   {
80 !       char    *xpwd;
81 !       xpwd = getcwd(0, 0);
82 !       exit (xpwd == 0);
83   }
84 ! ], bash_cv_getcwd_malloc=yes, bash_cv_getcwd_malloc=no,
85 !    [AC_MSG_WARN(cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no)
86 !     bash_cv_getcwd_malloc=no]
87   )])
88 ! AC_MSG_RESULT($bash_cv_getcwd_malloc)
89 ! if test $bash_cv_getcwd_malloc = no; then
90   AC_DEFINE(GETCWD_BROKEN)
91   AC_LIBOBJ(getcwd)