~ubuntu-branches/ubuntu/lucid/dpkg/lucid

« back to all changes in this revision

Viewing changes to libcompat/compat.h

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2009-09-18 13:39:36 UTC
  • mfrom: (1.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20090918133936-dj8kjtc2qz3yqj7i
Tags: 1.15.4ubuntu1
* Resynchronise with Debian (LP: #427854). Remaining changes:
  Ubuntu-specific adjustments (probably):
  - Use i686 for lpia in cputable and triplettable.
  - Hack Dpkg::Arch to return i686 for lpia.
  - Move various Conflicts to Breaks, since upgrades from stable Ubuntu
    releases support Breaks.

  Miscellaneous bug fixes:
  - Avoid duplicate attempts to [f]close in obscure error situations which
    might conceiveably close wrong fds.
  - Revert change to stop outputting a newline after a postinst is run
    (Debian #392317).
  - Use the two-arg form of open in Dpkg::Control so that "-" can be
    passed to parse stdin as a control file (Debian #465340).

  Launchpad integration:
  - Add Launchpad-Bugs-Fixed handling in a few more places.

  Build options:
  - Point to https://wiki.ubuntu.com/DistCompilerFlags from
    dpkg-buildpackage(1).
  - Set default LDFLAGS to -Wl,-Bsymbolic-functions. (We've already taken
    this hit in Ubuntu.)
  - Implement handling of hardening-wrapper options via DEB_BUILD_OPTIONS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * libcompat - system compatibility library
3
 
 * compat.h - system compatibility declarations
4
 
 *
5
 
 * Copyright © 1995 Ian Jackson <ian@chiark.greenend.org.uk>
6
 
 * Copyright © 2008 Guillem Jover <guillem@debian.org>
7
 
 *
8
 
 * This is free software; you can redistribute it and/or modify
9
 
 * it under the terms of the GNU General Public License as
10
 
 * published by the Free Software Foundation; either version 2,
11
 
 * or (at your option) any later version.
12
 
 *
13
 
 * This is distributed in the hope that it will be useful, but
14
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 
 * GNU General Public License for more details.
17
 
 *
18
 
 * You should have received a copy of the GNU General Public
19
 
 * License along with dpkg; if not, write to the Free Software
20
 
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
 
 */
22
 
 
23
 
#ifndef COMPAT_H
24
 
#define COMPAT_H
25
 
 
26
 
#ifdef __cplusplus
27
 
extern "C" {
28
 
#endif
29
 
 
30
 
#ifndef offsetof
31
 
#define offsetof(st, m) ((size_t)&((st *)NULL)->m)
32
 
#endif
33
 
 
34
 
/*
35
 
 * Define WCOREDUMP if we don't have it already, coredumps won't be
36
 
 * detected, though.
37
 
 */
38
 
#ifndef WCOREDUMP
39
 
#define WCOREDUMP(x) 0
40
 
#endif
41
 
 
42
 
#ifndef HAVE_STRTOUL
43
 
#define strtoul strtol
44
 
#endif
45
 
 
46
 
#ifndef HAVE_VA_COPY
47
 
#define va_copy(dest, src) (dest) = (src)
48
 
#endif
49
 
 
50
 
#include <strnlen.h>
51
 
 
52
 
#ifndef HAVE_STRERROR
53
 
const char *strerror(int);
54
 
#endif
55
 
 
56
 
#ifndef HAVE_STRSIGNAL
57
 
const char *strsignal(int);
58
 
#endif
59
 
 
60
 
#ifndef HAVE_SCANDIR
61
 
struct dirent;
62
 
int scandir(const char *dir, struct dirent ***namelist,
63
 
            int (*filter)(const struct dirent *),
64
 
            int (*cmp)(const void *, const void *));
65
 
#endif
66
 
 
67
 
#ifndef HAVE_ALPHASORT
68
 
int alphasort(const void *a, const void *b);
69
 
#endif
70
 
 
71
 
#ifndef HAVE_UNSETENV
72
 
int unsetenv(const char *x);
73
 
#endif
74
 
 
75
 
#ifdef __cplusplus
76
 
}
77
 
#endif
78
 
 
79
 
#endif /* COMPAT_H */
80