~nutznboltz-deactivatedaccount/ubuntu/precise/gnutls26/fix-lp926350

« back to all changes in this revision

Viewing changes to lib/gl/m4/lseek.m4

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler
  • Date: 2011-10-01 15:28:13 UTC
  • mfrom: (12.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20111001152813-yygm1c4cxonfxhzy
Tags: 2.12.11-1
* New upstream version.
  + Allow CA importing of 0 certificates to succeed. Closes: #640639
* Add libp11-kit-dev to libgnutls-dev dependencies. (see #643811)
* [20_guiledocstring.diff] guile: Fix docstring extraction with CPP 4.5+.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# lseek.m4 serial 5
2
 
dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
 
1
# lseek.m4 serial 7
 
2
dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
10
10
  AC_REQUIRE([AC_PROG_CC])
11
11
  AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe],
12
12
    [if test $cross_compiling = no; then
13
 
       AC_LINK_IFELSE([
 
13
       AC_LINK_IFELSE([AC_LANG_PROGRAM([[
14
14
#include <sys/types.h> /* for off_t */
15
15
#include <stdio.h> /* for SEEK_CUR */
16
 
#include <unistd.h>
17
 
int main ()
18
 
{
 
16
#include <unistd.h>]], [[
19
17
  /* Exit with success only if stdin is seekable.  */
20
18
  return lseek (0, (off_t)0, SEEK_CUR) < 0;
21
 
}],
 
19
]])],
22
20
         [if test -s conftest$ac_exeext \
23
21
             && ./conftest$ac_exeext < conftest.$ac_ext \
24
22
             && test 1 = "`echo hi \
29
27
          fi],
30
28
         [gl_cv_func_lseek_pipe=no])
31
29
     else
32
 
       AC_COMPILE_IFELSE([
 
30
       AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
33
31
#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
34
32
/* mingw and BeOS mistakenly return 0 when trying to seek on pipes.  */
35
33
  Choke me.
36
 
#endif],
 
34
#endif]])],
37
35
         [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
38
36
     fi])
39
37
  if test $gl_cv_func_lseek_pipe = no; then
40
 
    gl_REPLACE_LSEEK
 
38
    REPLACE_LSEEK=1
 
39
    AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
 
40
      [Define to 1 if lseek does not detect pipes.])
41
41
  fi
42
42
])
43
 
 
44
 
AC_DEFUN([gl_REPLACE_LSEEK],
45
 
[
46
 
  AC_LIBOBJ([lseek])
47
 
  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
48
 
  REPLACE_LSEEK=1
49
 
  AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
50
 
            [Define to 1 if lseek does not detect pipes.])
51
 
])