1
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/os.c,v 1.4 2003/10/15 16:29:04 dawes Exp $ */
4
* Copyright (c) 1999-2002 by The XFree86 Project, Inc.
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:
13
* The above copyright notice and this permission notice shall be included in
14
* all copies or substantial portions of the Software.
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.
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).
30
#ifdef HAVE_XORG_CONFIG_H
31
#include <xorg-config.h>
34
#include "loaderProcs.h"
37
* OSNAME is a standard form of the OS name that may be used by the
38
* loader and by OS-specific modules.
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"
50
#define OSNAME "lynxos"
51
#elif defined(__GNU__)
53
#elif defined(__SCO__)
59
#elif defined(SVR4) && defined(sun)
60
#define OSNAME "solaris"
65
#elif defined(__UNIXOS2__)
68
#define OSNAME "unknown"
71
/* Return the OS name, and run-time OS version */
74
LoaderGetOS(const char **name, int *major, int *minor, int *teeny)
79
/* reporting runtime versions isn't supported yet */