~ubuntu-branches/ubuntu/intrepid/parted/intrepid

« back to all changes in this revision

Viewing changes to gnulib/m4/mkdir-slash.m4

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-06-24 14:31:05 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080624143105-rd7yw67a9qnvh51i
Tags: 1.8.8.git.2008.03.24-7ubuntu1
* Resynchronise with Debian (LP: #237568). Remaining changes:
  - swap-uuid.dpatch: Create UUIDs on new swap partitions.
  - gptsync.dpatch: On Intel Mac systems, write a synced MBR rather than a
    protective MBR.
  - Add -fno-stack-protector on sparc.
  - sparc-new-label.dpatch: Fix sparc disk label generation. This is
    required for LDOM and parallel installations with Solaris 10.
  - loop-partitions.dpatch: Loop devices can only have one partition, so
    don't generate device names such as "/dev/loop0p1".
  - unpartitioned-disks.dpatch: Don't try to call BLKPG ioctls on
    unpartitionable disks (only implemented for loop devices at the
    moment), as they will always fail.
  - When building with gcc-4.3, add -Wno-array-bounds to CFLAGS.
  - Cell partition tables are misdetected as pc98, so disable pc98 support
    on powerpc.
  - array-bounds.dpatch: Backport patch from git to allow building with
    gcc-4.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#serial 5
 
2
 
 
3
# Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
 
4
# This file is free software; the Free Software Foundation
 
5
# gives unlimited permission to copy and/or distribute it,
 
6
# with or without modifications, as long as this notice is preserved.
 
7
 
 
8
# On some systems, mkdir ("foo/", 0700) fails because of the trailing slash.
 
9
# On such systems, arrange to use a wrapper function that removes any
 
10
# trailing slashes.
 
11
AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
 
12
[dnl
 
13
  AC_CHECK_HEADERS_ONCE(unistd.h)
 
14
  AC_CACHE_CHECK([whether mkdir fails due to a trailing slash],
 
15
    gl_cv_func_mkdir_trailing_slash_bug,
 
16
    [
 
17
      # Arrange for deletion of the temporary directory this test might create.
 
18
      ac_clean_files="$ac_clean_files confdir-slash"
 
19
      AC_TRY_RUN([
 
20
#       include <sys/types.h>
 
21
#       include <sys/stat.h>
 
22
#       include <stdlib.h>
 
23
#       ifdef HAVE_UNISTD_H
 
24
#         include <unistd.h>
 
25
#       endif
 
26
        int main ()
 
27
        {
 
28
          rmdir ("confdir-slash");
 
29
          exit (mkdir ("confdir-slash/", 0700));
 
30
        }
 
31
        ],
 
32
      gl_cv_func_mkdir_trailing_slash_bug=no,
 
33
      gl_cv_func_mkdir_trailing_slash_bug=yes,
 
34
      gl_cv_func_mkdir_trailing_slash_bug=yes
 
35
      )
 
36
    ]
 
37
  )
 
38
 
 
39
  if test $gl_cv_func_mkdir_trailing_slash_bug = yes; then
 
40
    AC_LIBOBJ(mkdir)
 
41
    AC_DEFINE(mkdir, rpl_mkdir,
 
42
      [Define to rpl_mkdir if the replacement function should be used.])
 
43
    gl_PREREQ_MKDIR
 
44
  fi
 
45
])
 
46
 
 
47
# Prerequisites of lib/mkdir.c.
 
48
AC_DEFUN([gl_PREREQ_MKDIR], [:])