b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/*
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Copyright 1995-1998 by Metro Link, Inc.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Permission to use, copy, modify, distribute, and sell this software and its
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * documentation for any purpose is hereby granted without fee, provided that
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * the above copyright notice appear in all copies and that both that
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * copyright notice and this permission notice appear in supporting
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * documentation, and that the name of Metro Link, Inc. not be used in
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * advertising or publicity pertaining to distribution of the software without
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * specific, written prior permission. Metro Link, Inc. makes no
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * representations about the suitability of this software for any purpose.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * It is provided "as is" without express or implied warranty.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * PERFORMANCE OF THIS SOFTWARE.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/*
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * copy of this software and associated documentation files (the "Software"),
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * to deal in the Software without restriction, including without limitation
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * and/or sell copies of the Software, and to permit persons to whom the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Software is furnished to do so, subject to the following conditions:
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * The above copyright notice and this permission notice shall be included in
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * all copies or substantial portions of the Software.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * OTHER DEALINGS IN THE SOFTWARE.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Except as contained in this notice, the name of the copyright holder(s)
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * and author(s) shall not be used in advertising or otherwise to promote
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * the sale, use or other dealings in this Software without prior written
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * authorization from the copyright holder(s) and author(s).
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#ifdef HAVE_XORG_CONFIG_H
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include <xorg-config.h>
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#ifndef _LOADER_H
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define _LOADER_H
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include <X11/Xosdefs.h>
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include <X11/Xfuncproto.h>
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include <X11/Xmd.h>
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/* LoadModule proc flags; LD_FLAG_GLOBAL adds symbols to global
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * namespace, default is to keep symbols local to module. */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define LD_FLAG_GLOBAL 1
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct _loader *loaderPtr;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/* Each module loaded has a loaderRec */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct _loader {
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int handle; /* Unique id used to remove symbols from
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * this module when it is unloaded */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int module; /* Unique id to identify compilation units */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync char *name;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync char *cname;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync void *private; /* format specific data */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync loaderPtr next;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync} loaderRec;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/* Compiled-in version information */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct {
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int xf86Version;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int ansicVersion;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int videodrvVersion;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int xinputVersion;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int extensionVersion;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int fontVersion;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync} ModuleVersions;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncextern const ModuleVersions LoaderVersionInfo;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncextern unsigned long LoaderOptions;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/* Internal Functions */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncvoid LoaderDuplicateSymbol(const char *, const int);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncchar *_LoaderModuleToName(int);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncint LoaderOpen(const char *, const char *, int, int *, int *, int *, int);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncint LoaderHandleOpen(int);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/* object to name lookup routines */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncchar *_LoaderHandleToName(int handle);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncchar *_LoaderHandleToCanonicalName(int handle);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/* Loader backends. */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include "dlloader.h"
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif /* _LOADER_H */