~ubuntu-branches/ubuntu/lucid/man-db/lucid-updates

« back to all changes in this revision

Viewing changes to gnulib/m4/time_h.m4

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-02-17 00:56:08 UTC
  • mfrom: (1.1.10 upstream) (5.2.10 sid)
  • Revision ID: james.westby@ubuntu.com-20100217005608-ko3mxv0qr29iaptz
Tags: 2.5.7-1
* New upstream release:
  - Make man(1) refer to the "Warnings" node in 'info groff' for a list of
    available warning names (closes: #545805).
  - Don't run tests if cross-compiling.
  - Add option to disable justification (closes: #440047).
  - Do what the user probably means when the full path to an executable is
    given as an argument (closes: #505465).
  - Search man<sec><ext> directories in the GNU layout (closes: #519807).
  - Prefer getting a page from the best manual section over getting a page
    in the correct language; I have my reservations about this, but it
    seems to be what people are requesting (closes: #519547).
  - 'man -f' and 'man -k' now pass through any -s option to apropos/whatis
    respectively.
  - All programs now support a MAN_DEBUG environment variable which can be
    used in place of the -d/--debug option. This is useful in some
    situations where a program is being called deep in a process tree.
  - Fix off-by-one error when write returns EAGAIN (thanks, Samuel
    Thibault; closes: #564818).
  - "%s: nothing appropriate." is an error; write it to stderr, not stdout
    (closes: #565255).
  - Don't bother printing error messages for SIGINT and SIGQUIT, since
    these correspond to explicit user actions (closes: #568000).
  - Fix sense of directory check while decompressing (closes: #537434).
  - Always save cat pages in UTF-8 (closes: #446741).
* Convert to source format 3.0 (quilt).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Configure a more-standard replacement for <time.h>.
 
2
 
 
3
# Copyright (C) 2000-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
 
4
 
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
# Written by Paul Eggert and Jim Meyering.
 
10
 
 
11
AC_DEFUN([gl_HEADER_TIME_H],
 
12
[
 
13
  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
 
14
  dnl once only, before all statements that occur in other macros.
 
15
  AC_REQUIRE([gl_HEADER_TIME_H_BODY])
 
16
])
 
17
 
 
18
AC_DEFUN([gl_HEADER_TIME_H_BODY],
 
19
[
 
20
  AC_REQUIRE([AC_C_RESTRICT])
 
21
  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
 
22
  gl_CHECK_NEXT_HEADERS([time.h])
 
23
  AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
 
24
])
 
25
 
 
26
AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
 
27
[
 
28
  dnl If another module says to replace or to not replace, do that.
 
29
  dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
 
30
  dnl this lets maintainers check for portability.
 
31
  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;  AC_SUBST([REPLACE_LOCALTIME_R])
 
32
  REPLACE_MKTIME=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_MKTIME])
 
33
  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;    AC_SUBST([REPLACE_NANOSLEEP])
 
34
  REPLACE_STRPTIME=GNULIB_PORTCHECK;     AC_SUBST([REPLACE_STRPTIME])
 
35
  REPLACE_TIMEGM=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_TIMEGM])
 
36
])
 
37
 
 
38
dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
 
39
dnl in time.h or sys/time.h.
 
40
 
 
41
AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
 
42
[
 
43
  AC_CHECK_HEADERS_ONCE([sys/time.h])
 
44
  AC_CACHE_CHECK([for struct timespec in <time.h>],
 
45
    [gl_cv_sys_struct_timespec_in_time_h],
 
46
    [AC_COMPILE_IFELSE(
 
47
       [AC_LANG_PROGRAM(
 
48
          [[#include <time.h>
 
49
          ]],
 
50
          [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
 
51
       [gl_cv_sys_struct_timespec_in_time_h=yes],
 
52
       [gl_cv_sys_struct_timespec_in_time_h=no])])
 
53
 
 
54
  TIME_H_DEFINES_STRUCT_TIMESPEC=0
 
55
  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
 
56
  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
 
57
    TIME_H_DEFINES_STRUCT_TIMESPEC=1
 
58
  else
 
59
    AC_CACHE_CHECK([for struct timespec in <sys/time.h>],
 
60
      [gl_cv_sys_struct_timespec_in_sys_time_h],
 
61
      [AC_COMPILE_IFELSE(
 
62
         [AC_LANG_PROGRAM(
 
63
            [[#include <sys/time.h>
 
64
            ]],
 
65
            [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
 
66
         [gl_cv_sys_struct_timespec_in_sys_time_h=yes],
 
67
         [gl_cv_sys_struct_timespec_in_sys_time_h=no])])
 
68
    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
 
69
      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
 
70
    fi
 
71
  fi
 
72
  AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
 
73
  AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
 
74
])