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

« back to all changes in this revision

Viewing changes to gnulib/m4/sys_time_h.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
# Configure a replacement for <sys/time.h>.
 
2
 
 
3
# Copyright (C) 2007 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
# Written by Paul Eggert and Martin Lambers.
 
9
 
 
10
AC_DEFUN([gl_HEADER_SYS_TIME_H],
 
11
[
 
12
  dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement
 
13
  dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1
 
14
  dnl statements that occur in other macros.
 
15
  AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
 
16
])
 
17
 
 
18
AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
 
19
[
 
20
  AC_REQUIRE([AC_C_RESTRICT])
 
21
  gl_CHECK_NEXT_HEADERS([sys/time.h])
 
22
 
 
23
  if test $ac_cv_header_sys_time_h = yes; then
 
24
    HAVE_SYS_TIME_H=1
 
25
  else
 
26
    HAVE_SYS_TIME_H=0
 
27
  fi
 
28
  AC_SUBST([HAVE_SYS_TIME_H])
 
29
 
 
30
  AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
 
31
    [AC_COMPILE_IFELSE(
 
32
       [AC_LANG_PROGRAM(
 
33
          [[#if HAVE_SYS_TIME_H
 
34
             #include <sys/time.h>
 
35
            #endif
 
36
            #include <time.h>
 
37
          ]],
 
38
          [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
 
39
       [gl_cv_sys_struct_timeval=yes],
 
40
       [gl_cv_sys_struct_timeval=no])])
 
41
  if test $gl_cv_sys_struct_timeval = yes; then
 
42
    HAVE_STRUCT_TIMEVAL=1
 
43
  else
 
44
    HAVE_STRUCT_TIMEVAL=0
 
45
  fi
 
46
  AC_SUBST([HAVE_STRUCT_TIMEVAL])
 
47
 
 
48
  dnl Assume POSIX behavior unless another module says otherwise.
 
49
  REPLACE_GETTIMEOFDAY=0
 
50
  AC_SUBST([REPLACE_GETTIMEOFDAY])
 
51
  if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then
 
52
    SYS_TIME_H=sys/time.h
 
53
  else
 
54
    SYS_TIME_H=
 
55
  fi
 
56
  AC_SUBST([SYS_TIME_H])
 
57
])