~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

« back to all changes in this revision

Viewing changes to m4/reorganization/code_checks/stat64.m4

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2014-07-15 01:08:10 UTC
  • mfrom: (0.35.47 sid)
  • Revision ID: package-import@ubuntu.com-20140715010810-ru66ek4fun2iseba
Tags: 0.98.4+dfsg-2~ubuntu13.10.1
No-change backport to saucy (LP: #1341962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_MSG_CHECKING([stat64])
 
2
AC_TRY_RUN([
 
3
#define _LARGEFILE_SOURCE
 
4
#define _LARGEFILE64_SOURCE
 
5
#include <stdio.h>
 
6
#include <sys/types.h>
 
7
#include <sys/stat.h>
 
8
#include <unistd.h>
 
9
#include <errno.h>
 
10
 
 
11
int main(void) {
 
12
    struct stat64 sb;
 
13
 
 
14
    if (stat64(".", &sb) == -1)
 
15
        return errno;
 
16
 
 
17
    return 0;
 
18
}
 
19
],
 
20
[enable_stat64=yes],
 
21
[enable_stat64=no],
 
22
[enable_stat64=no],
 
23
)
 
24
 
 
25
if test "$enable_stat64" != "no"; then
 
26
AC_DEFINE([HAVE_STAT64],1,[enable stat64])
 
27
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
 
28
fi
 
29
AC_MSG_RESULT([$enable_stat64])