~ubuntu-branches/ubuntu/wily/flrig/wily

« back to all changes in this revision

Viewing changes to .pc/0001-License-Declaration.patch/src/include/compat.h

  • Committer: Package Import Robot
  • Author(s): Kamal Mostafa
  • Date: 2014-10-25 11:17:10 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20141025111710-n32skgya3l9u1brw
Tags: 1.3.17-1
* New upstream release (Closes: #761839)
* Debian Standards-Version: 3.9.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef COMPAT_H
2
 
#define COMPAT_H
3
 
 
4
 
/* adapted from compat.h in git-1.6.1.2 */
5
 
 
6
 
#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX)
7
 
#  define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
8
 
#  define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
9
 
#endif
10
 
#define _ALL_SOURCE 1
11
 
#define _GNU_SOURCE 1
12
 
#define _BSD_SOURCE 1
13
 
 
14
 
#include <config.h>
15
 
 
16
 
#include <unistd.h>
17
 
#include <stdio.h>
18
 
#include <sys/stat.h>
19
 
#include <fcntl.h>
20
 
#include <stddef.h>
21
 
#include <stdlib.h>
22
 
#include <stdarg.h>
23
 
#include <string.h>
24
 
#include <errno.h>
25
 
#include <limits.h>
26
 
#include <sys/param.h>
27
 
#include <sys/types.h>
28
 
#include <sys/time.h>
29
 
#include <time.h>
30
 
#include <signal.h>
31
 
#include <assert.h>
32
 
 
33
 
#ifdef __WIN32__
34
 
#  define dirent fl_dirent_no_thanks
35
 
#  else
36
 
#  include <dirent.h>
37
 
#  include <sys/utsname.h>
38
 
#  include <sys/ipc.h>
39
 
#  include <sys/msg.h>
40
 
#endif
41
 
 
42
 
#include "compat-mingw.h"
43
 
 
44
 
#ifdef __cplusplus
45
 
extern "C" {
46
 
#endif
47
 
 
48
 
#if defined(__WOE32__) && (!defined(__GNUC__) || __GNUC__ < 4)
49
 
#  define SNPRINTF_RETURNS_BOGUS 1
50
 
#else
51
 
#  define SNPRINTF_RETURNS_BOGUS 0
52
 
#endif
53
 
 
54
 
#if SNPRINTF_RETURNS_BOGUS
55
 
#define snprintf git_snprintf
56
 
extern int git_snprintf(char *str, size_t maxsize,
57
 
                        const char *format, ...);
58
 
#define vsnprintf git_vsnprintf
59
 
extern int git_vsnprintf(char *str, size_t maxsize,
60
 
                         const char *format, va_list ap);
61
 
#endif
62
 
 
63
 
#ifdef __cplusplus
64
 
}
65
 
#endif
66
 
 
67
 
#endif // MINGW32_H