~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to hw/xfree86/loader/os.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
ImportĀ upstreamĀ versionĀ 7.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/os.c,v 1.4 2003/10/15 16:29:04 dawes Exp $ */
 
2
 
 
3
/*
 
4
 * Copyright (c) 1999-2002 by The XFree86 Project, Inc.
 
5
 *
 
6
 * Permission is hereby granted, free of charge, to any person obtaining a
 
7
 * copy of this software and associated documentation files (the "Software"),
 
8
 * to deal in the Software without restriction, including without limitation
 
9
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 
10
 * and/or sell copies of the Software, and to permit persons to whom the
 
11
 * Software is furnished to do so, subject to the following conditions:
 
12
 *
 
13
 * The above copyright notice and this permission notice shall be included in
 
14
 * all copies or substantial portions of the 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 NONINFRINGEMENT.  IN NO EVENT SHALL
 
19
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 
20
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 
21
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
22
 * OTHER DEALINGS IN THE SOFTWARE.
 
23
 *
 
24
 * Except as contained in this notice, the name of the copyright holder(s)
 
25
 * and author(s) shall not be used in advertising or otherwise to promote
 
26
 * the sale, use or other dealings in this Software without prior written
 
27
 * authorization from the copyright holder(s) and author(s).
 
28
 */
 
29
 
 
30
#ifdef HAVE_XORG_CONFIG_H
 
31
#include <xorg-config.h>
 
32
#endif
 
33
 
 
34
#include "loaderProcs.h"
 
35
 
 
36
/*
 
37
 * OSNAME is a standard form of the OS name that may be used by the
 
38
 * loader and by OS-specific modules.
 
39
 */
 
40
 
 
41
#if defined(__linux__)
 
42
#define OSNAME "linux"
 
43
#elif defined(__FreeBSD__)
 
44
#define OSNAME "freebsd"
 
45
#elif defined(__NetBSD__)
 
46
#define OSNAME "netbsd"
 
47
#elif defined(__OpenBSD__)
 
48
#define OSNAME "openbsd"
 
49
#elif defined(Lynx)
 
50
#define OSNAME "lynxos"
 
51
#elif defined(__GNU__)
 
52
#define OSNAME "hurd"
 
53
#elif defined(__SCO__)
 
54
#define OSNAME "sco"
 
55
#elif defined(DGUX)
 
56
#define OSNAME "dgux"
 
57
#elif defined(ISC)
 
58
#define OSNAME "isc"
 
59
#elif defined(SVR4) && defined(sun)
 
60
#define OSNAME "solaris"
 
61
#elif defined(SVR5)
 
62
#define OSNAME "svr5"
 
63
#elif defined(SVR4)
 
64
#define OSNAME "svr4"
 
65
#elif defined(__UNIXOS2__)
 
66
#define OSNAME "os2"
 
67
#else
 
68
#define OSNAME "unknown"
 
69
#endif
 
70
 
 
71
/* Return the OS name, and run-time OS version */
 
72
 
 
73
void
 
74
LoaderGetOS(const char **name, int *major, int *minor, int *teeny)
 
75
{
 
76
    if (name)
 
77
        *name = OSNAME;
 
78
 
 
79
    /* reporting runtime versions isn't supported yet */
 
80
}