1706f2543Smrg 2706f2543Smrg/* 3706f2543Smrg * Copyright (c) 2004, X.Org Foundation 4706f2543Smrg * 5706f2543Smrg * Permission is hereby granted, free of charge, to any person obtaining a 6706f2543Smrg * copy of this software and associated documentation files (the "Software"), 7706f2543Smrg * to deal in the Software without restriction, including without limitation 8706f2543Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9706f2543Smrg * and/or sell copies of the Software, and to permit persons to whom the 10706f2543Smrg * Software is furnished to do so, subject to the following conditions: 11706f2543Smrg * 12706f2543Smrg * The above copyright notice and this permission notice shall be included in 13706f2543Smrg * all copies or substantial portions of the Software. 14706f2543Smrg * 15706f2543Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16706f2543Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17706f2543Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18706f2543Smrg * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 19706f2543Smrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20706f2543Smrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21706f2543Smrg * OTHER DEALINGS IN THE SOFTWARE. 22706f2543Smrg * 23706f2543Smrg * Except as contained in this notice, the name of the copyright holder(s) 24706f2543Smrg * and author(s) shall not be used in advertising or otherwise to promote 25706f2543Smrg * the sale, use or other dealings in this Software without prior written 26706f2543Smrg * authorization from the copyright holder(s) and author(s). 27706f2543Smrg */ 28706f2543Smrg 29706f2543Smrg#ifndef XORG_VERSION_H 30706f2543Smrg# define XORG_VERSION_H 31706f2543Smrg 32706f2543Smrg# ifndef XORG_VERSION_CURRENT 33706f2543Smrg# error 34706f2543Smrg# endif 35706f2543Smrg 36706f2543Smrg# define XORG_VERSION_NUMERIC(major,minor,patch,snap,dummy) \ 37706f2543Smrg (((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap) 38706f2543Smrg 39706f2543Smrg# define XORG_GET_MAJOR_VERSION(vers) ((vers) / 10000000) 40706f2543Smrg# define XORG_GET_MINOR_VERSION(vers) (((vers) % 10000000) / 100000) 41706f2543Smrg# define XORG_GET_PATCH_VERSION(vers) (((vers) % 100000) / 1000) 42706f2543Smrg# define XORG_GET_SNAP_VERSION(vers) ((vers) % 1000) 43706f2543Smrg 44706f2543Smrg# define XORG_VERSION_MAJOR XORG_GET_MAJOR_VERSION(XORG_VERSION_CURRENT) 45706f2543Smrg# define XORG_VERSION_MINOR XORG_GET_MINOR_VERSION(XORG_VERSION_CURRENT) 46706f2543Smrg# define XORG_VERSION_PATCH XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT) 47706f2543Smrg# define XORG_VERSION_SNAP XORG_GET_SNAP_VERSION(XORG_VERSION_CURRENT) 48706f2543Smrg 49706f2543Smrg#endif 50