~ubuntu-branches/ubuntu/karmic/virtualbox-ose/karmic-updates

« back to all changes in this revision

Viewing changes to src/VBox/Additions/x11/x11include/xorg-server-1.6.0/glxbyteorder.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-09-14 18:25:07 UTC
  • mfrom: (0.4.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090914182507-c98g07mq16hjmn6d
Tags: 3.0.6-dfsg-1ubuntu1
* Merge from debian unstable (LP: #429697), remaining changes:
  - Enable DKMS support on virtualbox host and guest modules (LP: #267097)
    - Drop virtualbox-ose{-guest,}-modules-* package templates
    - Recommend *-source instead of *-modules packages
    - Replace error messages related to missing/mismatched
      kernel module accordingly
  - Autoload kernel module
    - LOAD_VBOXDRV_MODULE=1 in virtualbox-ose.default
  - Disable update action
    - patches/u01-disable-update-action.dpatch
  - Virtualbox should go in Accessories, not in System tools (LP: #288590)
    - virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add apport hook
    - virtualbox-ose.files/source_virtualbox-ose.py
    - virtualbox-ose.install
  - Add launchpad integration
    - control
    - lpi-bug.xpm
    - patches/u02-lp-integration.dpatch
  - virtualbox, virtualbox-* (names of the upstream proprietary packages)
    conflict with virtualbox-ose (LP: #379878)
* Make debug package depend on normal or guest utils package
* Drop patches/22-pulseaudio-stubs.dpatch (applied upstream)
* Rename Ubuntu specific patches to uXX-*.dpatch
* Fix lintian warnings in maintainer scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * (C) Copyright IBM Corporation 2006, 2007
3
 
 * All Rights Reserved.
4
 
 * 
5
 
 * Permission is hereby granted, free of charge, to any person obtaining a
6
 
 * copy of this software and associated documentation files (the "Software"),
7
 
 * to deal in the Software without restriction, including without limitation
8
 
 * the rights to use, copy, modify, merge, publish, distribute, sub license,
9
 
 * and/or sell copies of the Software, and to permit persons to whom the
10
 
 * Software is furnished to do so, subject to the following conditions:
11
 
 * 
12
 
 * The above copyright notice and this permission notice (including the next
13
 
 * paragraph) shall be included in all copies or substantial portions of the
14
 
 * Software.
15
 
 * 
16
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
 
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
 
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
19
 
 * THE COPYRIGHT HOLDERS, THE AUTHORS, AND/OR THEIR SUPPLIERS BE LIABLE FOR
20
 
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
 
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
22
 
 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
 
 */
24
 
 
25
 
/**
26
 
 * \file glxbyteorder.h
27
 
 * Platform glue for handling byte-ordering issues in GLX protocol.
28
 
 * 
29
 
 * \author Ian Romanick <idr@us.ibm.com>
30
 
 */
31
 
#if !defined(__GLXBYTEORDER_H__)
32
 
#define __GLXBYTEORDER_H__
33
 
 
34
 
#ifdef HAVE_DIX_CONFIG_H
35
 
#include <dix-config.h>
36
 
#endif
37
 
 
38
 
#if HAVE_BYTESWAP_H
39
 
#include <byteswap.h>
40
 
#elif defined(USE_SYS_ENDIAN_H)
41
 
#include <sys/endian.h>
42
 
#elif defined(__APPLE__)
43
 
#include <libkern/OSByteOrder.h>
44
 
#define bswap_16 OSSwapInt16
45
 
#define bswap_32 OSSwapInt32
46
 
#define bswap_64 OSSwapInt64
47
 
#else
48
 
#define bswap_16(value)  \
49
 
        ((((value) & 0xff) << 8) | ((value) >> 8))
50
 
 
51
 
#define bswap_32(value) \
52
 
        (((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | \
53
 
        (uint32_t)bswap_16((uint16_t)((value) >> 16)))
54
 
 
55
 
#define bswap_64(value) \
56
 
        (((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) \
57
 
            << 32) | \
58
 
        (uint64_t)bswap_32((uint32_t)((value) >> 32)))
59
 
#endif
60
 
 
61
 
#endif /* !defined(__GLXBYTEORDER_H__) */