~ubuntu-branches/ubuntu/trusty/patch/trusty-security

« back to all changes in this revision

Viewing changes to m4/stat.m4

  • Committer: Package Import Robot
  • Author(s): Christoph Berg
  • Date: 2013-01-03 17:34:45 UTC
  • mto: (6.1.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20130103173445-5vf8qmnfgd7ug67h
Tags: upstream-2.7.1
ImportĀ upstreamĀ versionĀ 2.7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# serial 7
 
1
# serial 10
2
2
 
3
 
# Copyright (C) 2009-2011 Free Software Foundation, Inc.
 
3
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
4
4
#
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
23
23
            mingw*) gl_cv_func_stat_dir_slash="guessing no";;
24
24
            *) gl_cv_func_stat_dir_slash="guessing yes";;
25
25
          esac])])
26
 
  dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/")
27
 
  dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/")
 
26
  dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/").
 
27
  dnl (For mingw, this is due to a broken stat() override in libmingwex.a.)
 
28
  dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/").
28
29
  AC_CACHE_CHECK([whether stat handles trailing slashes on files],
29
30
      [gl_cv_func_stat_file_slash],
30
31
      [touch conftest.tmp
46
47
      return result;
47
48
           ]])],
48
49
         [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
49
 
         [gl_cv_func_stat_file_slash="guessing no"])
 
50
         [case "$host_os" in
 
51
                    # Guess yes on glibc systems.
 
52
            *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
 
53
                    # If we don't know, assume the worst.
 
54
            *)      gl_cv_func_stat_file_slash="guessing no" ;;
 
55
          esac
 
56
         ])
50
57
       rm -f conftest.tmp conftest.lnk])
51
58
  case $gl_cv_func_stat_dir_slash in
52
59
    *no) REPLACE_STAT=1
58
65
      AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
59
66
        help when passed a file name with a trailing slash]);;
60
67
  esac
61
 
  if test $REPLACE_STAT = 1; then
62
 
    AC_LIBOBJ([stat])
63
 
    dnl Prerequisites of lib/stat.c.
64
 
    AC_REQUIRE([AC_C_INLINE])
65
 
  fi
 
68
])
 
69
 
 
70
# Prerequisites of lib/stat.c.
 
71
AC_DEFUN([gl_PREREQ_STAT],
 
72
[
 
73
  AC_REQUIRE([AC_C_INLINE])
 
74
  :
66
75
])