~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to lib/alignof.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-10-19 00:00:09 UTC
  • mfrom: (2.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20111019000009-8p33w3wz4b1rdri0
Tags: 1.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
  - Depend on libssl-dev 0.9.8k-7ubuntu4 (LP: #503339)
* Dropped changes, superseded in Debian:
  - Keep build dependencies in main:
    + debian/control: remove info2man build-dep
    + debian/patches/series: disable wget-infopod_generated_manpage
  - Mark wget Multi-Arch: foreign, so packages that aren't of the same arch
    can depend on it.
* Pass --with-ssl=openssl; we don't want to use gnutls, there's no udeb for
  it.
* Add a second build pass for the udeb, so we can build without libidn.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- buffer-read-only: t -*- vi: set ro: */
 
2
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
 
3
/* Determine alignment of types.
 
4
   Copyright (C) 2003-2004, 2006, 2009-2011 Free Software Foundation, Inc.
 
5
 
 
6
   This program is free software; you can redistribute it and/or modify
 
7
   it under the terms of the GNU General Public License as published by
 
8
   the Free Software Foundation; either version 3, or (at your option)
 
9
   any later version.
 
10
 
 
11
   This program is distributed in the hope that it will be useful,
 
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
   GNU General Public License for more details.
 
15
 
 
16
   You should have received a copy of the GNU General Public License
 
17
   along with this program; if not, write to the Free Software Foundation,
 
18
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
19
 
 
20
#ifndef _ALIGNOF_H
 
21
#define _ALIGNOF_H
 
22
 
 
23
#include <stddef.h>
 
24
 
 
25
/* Determine the alignment of a structure slot (field) of a given type,
 
26
   at compile time.  Note that the result depends on the ABI.
 
27
   Note: The result cannot be used as a value for an 'enum' constant,
 
28
   due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc.  */
 
29
#if defined __cplusplus
 
30
  template <class type> struct alignof_helper { char __slot1; type __slot2; };
 
31
# define alignof_slot(type) offsetof (alignof_helper<type>, __slot2)
 
32
#else
 
33
# define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
 
34
#endif
 
35
 
 
36
/* Determine the good alignment of an object of the given type at compile time.
 
37
   Note that this is not necessarily the same as alignof_slot(type).
 
38
   For example, with GNU C on x86 platforms: alignof_type(double) = 8, but
 
39
   - when -malign-double is not specified:  alignof_slot(double) = 4,
 
40
   - when -malign-double is specified:      alignof_slot(double) = 8.
 
41
   Note: The result cannot be used as a value for an 'enum' constant,
 
42
   due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc.  */
 
43
#if defined __GNUC__
 
44
# define alignof_type __alignof__
 
45
#else
 
46
# define alignof_type alignof_slot
 
47
#endif
 
48
 
 
49
/* alignof is an alias for alignof_slot semantics, since that's what most
 
50
   callers need.
 
51
   Note: The result cannot be used as a value for an 'enum' constant,
 
52
   due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc.  */
 
53
#define alignof alignof_slot
 
54
 
 
55
#endif /* _ALIGNOF_H */