|
From: Hans-Bernhard B. <br...@us...> - 2002-07-11 14:23:49
|
Update of /cvsroot/cscope/cscope
In directory usw-pr-cvs1:/tmp/cvs-serv8314
Modified Files:
ChangeLog config.h.in configure configure.in
Log Message:
Fixes for DOS: access() bits, lstat()->stat(), BSD<->DOS setmode()
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cscope/cscope/ChangeLog,v
retrieving revision 1.115
retrieving revision 1.116
diff -C2 -r1.115 -r1.116
*** ChangeLog 8 Jul 2002 15:52:24 -0000 1.115
--- ChangeLog 11 Jul 2002 14:23:45 -0000 1.116
***************
*** 1,2 ****
--- 1,8 ----
+ (2002/07/10 - broeker) Get rid of assumption about values of access()
+ parameters W_OK and R_OK --- make assumptions only
+ if system doesn't supply values. Add check for
+ existence of lstat(); fall back to stat() if not
+ available. Avoid confusion of DOS' setmode() with
+ BSD function of same name...
(2002/07/07 - broeker) Delete tempfile before redirecting to it, to avoid
complaints about clobbering from poorly configured
Index: config.h.in
===================================================================
RCS file: /cvsroot/cscope/cscope/config.h.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** config.h.in 4 Jan 2002 12:11:50 -0000 1.11
--- config.h.in 11 Jul 2002 14:23:45 -0000 1.12
***************
*** 67,70 ****
--- 67,73 ----
#undef HAVE_GETCWD
+ /* Define if you have the lstat function. */
+ #undef HAVE_LSTAT
+
/* Define if you have the memcpy function. */
#undef HAVE_MEMCPY
Index: configure
===================================================================
RCS file: /cvsroot/cscope/cscope/configure,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** configure 13 Mar 2002 20:39:13 -0000 1.17
--- configure 11 Jul 2002 14:23:45 -0000 1.18
***************
*** 2407,2480 ****
fi
- for ac_func in strchr memcpy memset setmode _setmode
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:2413: checking for $ac_func" >&5
- if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 2418 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
-
- int main() {
-
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
-
- ; return 0; }
- EOF
- if { (eval echo configure:2441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
-
- if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
-
for ac_hdr in fcntl.h sys/window.h sys/termios.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2469: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2474 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
--- 2407,2425 ----
fi
for ac_hdr in fcntl.h sys/window.h sys/termios.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2414: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2419 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
***************
*** 2504,2513 ****
echo $ac_n "checking for working const""... $ac_c" 1>&6
! echo "configure:2507: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2512 "configure"
#include "confdefs.h"
--- 2449,2458 ----
echo $ac_n "checking for working const""... $ac_c" 1>&6
! echo "configure:2452: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2457 "configure"
#include "confdefs.h"
***************
*** 2558,2562 ****
; return 0; }
EOF
! if { (eval echo configure:2561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
--- 2503,2507 ----
; return 0; }
EOF
! if { (eval echo configure:2506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
***************
*** 2579,2588 ****
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
! echo "configure:2582: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2587 "configure"
#include "confdefs.h"
#include <sys/types.h>
--- 2524,2533 ----
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
! echo "configure:2527: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2532 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 2612,2621 ****
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:2615: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2620 "configure"
#include "confdefs.h"
#include <sys/types.h>
--- 2557,2566 ----
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:2560: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2565 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 2645,2654 ****
echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:2648: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2653 "configure"
#include "confdefs.h"
#include <sys/types.h>
--- 2590,2599 ----
echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:2593: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2598 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 2679,2688 ****
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
! echo "configure:2682: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2687 "configure"
#include "confdefs.h"
#include <sys/types.h>
--- 2624,2633 ----
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
! echo "configure:2627: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2632 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 2701,2705 ****
; return 0; }
EOF
! if { (eval echo configure:2704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
--- 2646,2650 ----
; return 0; }
EOF
! if { (eval echo configure:2649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
***************
*** 2719,2723 ****
! for ac_func in getcwd regcmp regcomp strerror vsnprintf snprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
--- 2664,2723 ----
! for ac_func in strchr memcpy memset setmode _setmode
! do
! echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2670: checking for $ac_func" >&5
! if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
! echo $ac_n "(cached) $ac_c" 1>&6
! else
! cat > conftest.$ac_ext <<EOF
! #line 2675 "configure"
! #include "confdefs.h"
! /* System header to define __stub macros and hopefully few prototypes,
! which can conflict with char $ac_func(); below. */
! #include <assert.h>
! /* Override any gcc2 internal prototype to avoid an error. */
! /* We use char because int might match the return type of a gcc2
! builtin and then its argument prototype would still apply. */
! char $ac_func();
!
! int main() {
!
! /* The GNU C library defines this for functions which it implements
! to always fail with ENOSYS. Some functions are actually named
! something starting with __ and the normal name is an alias. */
! #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
! choke me
! #else
! $ac_func();
! #endif
!
! ; return 0; }
! EOF
! if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
! rm -rf conftest*
! eval "ac_cv_func_$ac_func=yes"
! else
! echo "configure: failed program was:" >&5
! cat conftest.$ac_ext >&5
! rm -rf conftest*
! eval "ac_cv_func_$ac_func=no"
! fi
! rm -f conftest*
! fi
!
! if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
! echo "$ac_t""yes" 1>&6
! ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
! cat >> confdefs.h <<EOF
! #define $ac_tr_func 1
! EOF
!
! else
! echo "$ac_t""no" 1>&6
! fi
! done
!
! for ac_func in getcwd regcmp regcomp strerror vsnprintf snprintf lstat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Index: configure.in
===================================================================
RCS file: /cvsroot/cscope/cscope/configure.in,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** configure.in 13 Mar 2002 20:39:13 -0000 1.23
--- configure.in 11 Jul 2002 14:23:45 -0000 1.24
***************
*** 482,486 ****
AC_HEADER_DIRENT
AC_HEADER_STDC
- AC_CHECK_FUNCS(strchr memcpy memset setmode _setmode)
AC_CHECK_HEADERS(fcntl.h sys/window.h sys/termios.h unistd.h)
--- 482,485 ----
***************
*** 493,497 ****
dnl Checks for library functions.
AC_TYPE_SIGNAL
! AC_CHECK_FUNCS(getcwd regcmp regcomp strerror vsnprintf snprintf)
AC_CHECK_FUNCS(fixkeypad)
--- 492,497 ----
dnl Checks for library functions.
AC_TYPE_SIGNAL
! AC_CHECK_FUNCS(strchr memcpy memset setmode _setmode)
! AC_CHECK_FUNCS(getcwd regcmp regcomp strerror vsnprintf snprintf lstat)
AC_CHECK_FUNCS(fixkeypad)
|