summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/WaitFor.c18
-rw-r--r--os/access.c38
-rw-r--r--os/auth.c16
-rw-r--r--os/backtrace.c6
-rw-r--r--os/connection.c48
-rw-r--r--os/io.c20
-rw-r--r--os/log.c34
-rw-r--r--os/oscolor.c2
-rw-r--r--os/osinit.c10
-rw-r--r--os/strcasecmp.c4
-rw-r--r--os/strcasestr.c2
-rw-r--r--os/strlcat.c2
-rw-r--r--os/strlcpy.c2
-rw-r--r--os/utils.c120
-rw-r--r--os/xprintf.c8
15 files changed, 165 insertions, 165 deletions
diff --git a/os/WaitFor.c b/os/WaitFor.c
index eb163b668..1633b4993 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -142,7 +142,7 @@ static OsTimerPtr timers = NULL;
* pClientsReady is an array to store ready client->index values into.
*****************/
-_X_EXPORT int
+int
WaitForSomething(int *pClientsReady)
{
int i;
@@ -421,7 +421,7 @@ DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev)
TimerSet(timer, 0, newTime, timer->callback, timer->arg);
}
-_X_EXPORT OsTimerPtr
+OsTimerPtr
TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
OsTimerCallback func, pointer arg)
{
@@ -475,7 +475,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
return timer;
}
-_X_EXPORT Bool
+Bool
TimerForce(OsTimerPtr timer)
{
OsTimerPtr *prev;
@@ -492,7 +492,7 @@ TimerForce(OsTimerPtr timer)
}
-_X_EXPORT void
+void
TimerCancel(OsTimerPtr timer)
{
OsTimerPtr *prev;
@@ -509,7 +509,7 @@ TimerCancel(OsTimerPtr timer)
}
}
-_X_EXPORT void
+void
TimerFree(OsTimerPtr timer)
{
if (!timer)
@@ -518,7 +518,7 @@ TimerFree(OsTimerPtr timer)
xfree(timer);
}
-_X_EXPORT void
+void
TimerCheck(void)
{
CARD32 now = GetTimeInMillis();
@@ -527,7 +527,7 @@ TimerCheck(void)
DoTimer(timers, now, &timers);
}
-_X_EXPORT void
+void
TimerInit(void)
{
OsTimerPtr timer;
@@ -626,7 +626,7 @@ ScreenSaverTimeoutExpire(OsTimerPtr timer,CARD32 now,pointer arg)
static OsTimerPtr ScreenSaverTimer = NULL;
-_X_EXPORT void
+void
FreeScreenSaverTimer(void)
{
if (ScreenSaverTimer) {
@@ -635,7 +635,7 @@ FreeScreenSaverTimer(void)
}
}
-_X_EXPORT void
+void
SetScreenSaverTimer(void)
{
CARD32 timeout = 0;
diff --git a/os/access.c b/os/access.c
index 670ec368e..5d688a71e 100644
--- a/os/access.c
+++ b/os/access.c
@@ -179,7 +179,7 @@ SOFTWARE.
#endif
#endif
-_X_EXPORT Bool defeatAccessControl = FALSE;
+Bool defeatAccessControl = FALSE;
#define acmp(a1, a2, len) memcmp((char *)(a1), (char *)(a2), len)
#define acopy(a1, a2, len) memmove((char *)(a2), (char *)(a1), len)
@@ -240,7 +240,7 @@ static void siTypesInitialize(void);
* local host to the access list
*/
-_X_EXPORT void
+void
EnableLocalHost (void)
{
if (!UsingXdmcp)
@@ -253,7 +253,7 @@ EnableLocalHost (void)
/*
* called when authorization is enabled to keep us secure
*/
-_X_EXPORT void
+void
DisableLocalHost (void)
{
HOST *self;
@@ -271,7 +271,7 @@ DisableLocalHost (void)
* adds local hosts manually when needed
*/
-_X_EXPORT void
+void
AccessUsingXdmcp (void)
{
UsingXdmcp = TRUE;
@@ -321,7 +321,7 @@ ifioctl (int fd, int cmd, char *arg)
*/
#if !defined(SIOCGIFCONF)
-_X_EXPORT void
+void
DefineSelf (int fd)
{
#if !defined(TCPCONN) && !defined(STREAMSCONN) && !defined(UNIXCONN) && !defined(MNX_TCPCONN)
@@ -847,7 +847,7 @@ DefineSelf (int fd)
#endif /* hpux && !HAS_IFREQ */
#ifdef XDMCP
-_X_EXPORT void
+void
AugmentSelf(pointer from, int len)
{
int family;
@@ -873,7 +873,7 @@ AugmentSelf(pointer from, int len)
}
#endif
-_X_EXPORT void
+void
AddLocalHosts (void)
{
HOST *self;
@@ -887,7 +887,7 @@ AddLocalHosts (void)
}
/* Reset access control list to initial hosts */
-_X_EXPORT void
+void
ResetHosts (char *display)
{
register HOST *host;
@@ -1095,7 +1095,7 @@ ResetHosts (char *display)
}
/* Is client on the local host */
-_X_EXPORT Bool LocalClient(ClientPtr client)
+Bool LocalClient(ClientPtr client)
{
int alen, family, notused;
Xtransaddr *from = NULL;
@@ -1132,7 +1132,7 @@ _X_EXPORT Bool LocalClient(ClientPtr client)
*
* Used by XShm to test access rights to shared memory segments
*/
-_X_EXPORT int
+int
LocalClientCred(ClientPtr client, int *pUid, int *pGid)
{
LocalClientCredRec *lcc;
@@ -1161,7 +1161,7 @@ LocalClientCred(ClientPtr client, int *pUid, int *pGid)
* Used by localuser & localgroup ServerInterpreted access control forms below
* Used by AuthAudit to log who local connections came from
*/
-_X_EXPORT int
+int
GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
{
#if defined(HAS_GETPEEREID) || defined(HAS_GETPEERUCRED) || defined(SO_PEERCRED)
@@ -1260,7 +1260,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp)
#endif
}
-_X_EXPORT void
+void
FreeLocalClientCreds(LocalClientCredRec *lcc)
{
if (lcc != NULL) {
@@ -1290,7 +1290,7 @@ AuthorizedClient(ClientPtr client)
/* Add a host to the access control list. This is the external interface
* called from the dispatcher */
-_X_EXPORT int
+int
AddHost (ClientPtr client,
int family,
unsigned length, /* of bytes in pAddr */
@@ -1335,7 +1335,7 @@ AddHost (ClientPtr client,
return BadAlloc;
}
-_X_EXPORT Bool
+Bool
ForEachHostInFamily (int family,
Bool (*func)(
unsigned char * /* addr */,
@@ -1387,7 +1387,7 @@ NewHost (int family,
/* Remove a host from the access control list */
-_X_EXPORT int
+int
RemoveHost (
ClientPtr client,
int family,
@@ -1441,7 +1441,7 @@ RemoveHost (
}
/* Get all hosts in the access control list */
-_X_EXPORT int
+int
GetHosts (
pointer *data,
int *pnHosts,
@@ -1540,7 +1540,7 @@ CheckAddr (
/* Check if a host is not in the access control list.
* Returns 1 if host is invalid, 0 if we've found it. */
-_X_EXPORT int
+int
InvalidHost (
register struct sockaddr *saddr,
int len,
@@ -1651,7 +1651,7 @@ ConvertAddr (
}
}
-_X_EXPORT int
+int
ChangeAccessControl(
ClientPtr client,
int fEnabled)
@@ -1664,7 +1664,7 @@ ChangeAccessControl(
}
/* returns FALSE if xhost + in effect, else TRUE */
-_X_EXPORT int
+int
GetAccessControl(void)
{
return AccessEnabled;
diff --git a/os/auth.c b/os/auth.c
index 4a67b37be..a852e1c3b 100644
--- a/os/auth.c
+++ b/os/auth.c
@@ -100,7 +100,7 @@ static char *authorization_file = (char *)NULL;
static Bool ShouldLoadAuth = TRUE;
-_X_EXPORT void
+void
InitAuthorization (char *file_name)
{
authorization_file = file_name;
@@ -145,7 +145,7 @@ LoadAuthorization (void)
* XdmcpInit calls this function to discover all authorization
* schemes supported by the display
*/
-_X_EXPORT void
+void
RegisterAuthorizations (void)
{
int i;
@@ -156,7 +156,7 @@ RegisterAuthorizations (void)
}
#endif
-_X_EXPORT XID
+XID
CheckAuthorization (
unsigned int name_length,
char *name,
@@ -221,7 +221,7 @@ CheckAuthorization (
return (XID) ~0L;
}
-_X_EXPORT void
+void
ResetAuthorization (void)
{
int i;
@@ -232,7 +232,7 @@ ResetAuthorization (void)
ShouldLoadAuth = TRUE;
}
-_X_EXPORT int
+int
AuthorizationFromID (
XID id,
unsigned short *name_lenp,
@@ -253,7 +253,7 @@ AuthorizationFromID (
return 0;
}
-_X_EXPORT int
+int
RemoveAuthorization (
unsigned short name_length,
char *name,
@@ -273,7 +273,7 @@ RemoveAuthorization (
return 0;
}
-_X_EXPORT int
+int
AddAuthorization (unsigned name_length, char *name, unsigned data_length, char *data)
{
int i;
@@ -291,7 +291,7 @@ AddAuthorization (unsigned name_length, char *name, unsigned data_length, char *
#ifdef XCSECURITY
-_X_EXPORT XID
+XID
GenerateAuthorization(
unsigned name_length,
char *name,
diff --git a/os/backtrace.c b/os/backtrace.c
index e51b93043..b52dcded8 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -30,7 +30,7 @@
#ifdef HAVE_BACKTRACE
#include <execinfo.h>
-_X_EXPORT void xorg_backtrace(void)
+void xorg_backtrace(void)
{
void *array[32]; /* deeper nesting than this means something's wrong */
size_t size, i;
@@ -168,7 +168,7 @@ static int xorg_backtrace_pstack(void) {
# if defined(HAVE_PSTACK) || defined(HAVE_WALKCONTEXT)
-_X_EXPORT void xorg_backtrace(void) {
+void xorg_backtrace(void) {
ErrorF("\nBacktrace:\n");
@@ -195,7 +195,7 @@ _X_EXPORT void xorg_backtrace(void) {
# else
/* Default fallback if we can't find any way to get a backtrace */
-_X_EXPORT void xorg_backtrace(void) { return; }
+void xorg_backtrace(void) { return; }
# endif
#endif
diff --git a/os/connection.c b/os/connection.c
index 9153d1564..ed3ecab42 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -141,12 +141,12 @@ fd_set LastSelectMask; /* mask returned from last select call */
fd_set ClientsWithInput; /* clients with FULL requests in buffer */
fd_set ClientsWriteBlocked; /* clients who cannot receive output */
fd_set OutputPending; /* clients with reply/event data ready to go */
-_X_EXPORT int MaxClients = 0;
+int MaxClients = 0;
Bool NewOutputPending; /* not yet attempted to write some new output */
Bool AnyClientsWriteBlocked; /* true if some client blocked on write */
static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */
-_X_EXPORT Bool PartialNetwork; /* continue even if unable to bind all addrs */
+Bool PartialNetwork; /* continue even if unable to bind all addrs */
static Pid_t ParentProcess;
static Bool debug_conns = FALSE;
@@ -156,7 +156,7 @@ static fd_set GrabImperviousClients;
static fd_set SavedAllClients;
static fd_set SavedAllSockets;
static fd_set SavedClientsWithInput;
-_X_EXPORT int GrabInProgress = 0;
+int GrabInProgress = 0;
#if !defined(WIN32)
int *ConnectionTranslation = NULL;
@@ -273,7 +273,7 @@ lookup_trans_conn (int fd)
/* Set MaxClients and lastfdesc, and allocate ConnectionTranslation */
-_X_EXPORT void
+void
InitConnectionLimits(void)
{
lastfdesc = -1;
@@ -358,7 +358,7 @@ InitParentProcess(void)
#endif
}
-_X_EXPORT void
+void
NotifyParentProcess(void)
{
#if !defined(WIN32)
@@ -375,7 +375,7 @@ NotifyParentProcess(void)
* At initialization, create the sockets to listen on for new clients.
*****************/
-_X_EXPORT void
+void
CreateWellKnownSockets(void)
{
int i;
@@ -442,7 +442,7 @@ CreateWellKnownSockets(void)
#endif
}
-_X_EXPORT void
+void
ResetWellKnownSockets (void)
{
int i;
@@ -493,7 +493,7 @@ ResetWellKnownSockets (void)
#endif
}
-_X_EXPORT void
+void
CloseWellKnownConnections(void)
{
int i;
@@ -618,7 +618,7 @@ AuthAudit (ClientPtr client, Bool letin,
#endif
}
-_X_EXPORT XID
+XID
AuthorizationIDOfClient(ClientPtr client)
{
if (client->osPrivate)
@@ -647,7 +647,7 @@ AuthorizationIDOfClient(ClientPtr client)
*
*****************************************************************/
-_X_EXPORT char *
+char *
ClientAuthorized(ClientPtr client,
unsigned int proto_n, char *auth_proto,
unsigned int string_n, char *auth_string)
@@ -798,7 +798,7 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time)
*****************/
/*ARGSUSED*/
-_X_EXPORT Bool
+Bool
EstablishNewConnections(ClientPtr clientUnused, pointer closure)
{
fd_set readyconnections; /* set of listeners that are ready */
@@ -980,7 +980,7 @@ CloseDownFileDescriptor(OsCommPtr oc)
* to check each and every socket individually.
*****************/
-_X_EXPORT void
+void
CheckConnections(void)
{
#ifndef WIN32
@@ -1040,7 +1040,7 @@ CheckConnections(void)
* Delete client from AllClients and free resources
*****************/
-_X_EXPORT void
+void
CloseDownConnection(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -1058,7 +1058,7 @@ CloseDownConnection(ClientPtr client)
AuditF("client %d disconnected\n", client->index);
}
-_X_EXPORT void
+void
AddGeneralSocket(int fd)
{
FD_SET(fd, &AllSockets);
@@ -1066,14 +1066,14 @@ AddGeneralSocket(int fd)
FD_SET(fd, &SavedAllSockets);
}
-_X_EXPORT void
+void
AddEnabledDevice(int fd)
{
FD_SET(fd, &EnabledDevices);
AddGeneralSocket(fd);
}
-_X_EXPORT void
+void
RemoveGeneralSocket(int fd)
{
FD_CLR(fd, &AllSockets);
@@ -1081,7 +1081,7 @@ RemoveGeneralSocket(int fd)
FD_CLR(fd, &SavedAllSockets);
}
-_X_EXPORT void
+void
RemoveEnabledDevice(int fd)
{
FD_CLR(fd, &EnabledDevices);
@@ -1098,7 +1098,7 @@ RemoveEnabledDevice(int fd)
* This routine is "undone" by ListenToAllClients()
*****************/
-_X_EXPORT int
+int
OnlyListenToOneClient(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -1135,7 +1135,7 @@ OnlyListenToOneClient(ClientPtr client)
* Undoes OnlyListentToOneClient()
****************/
-_X_EXPORT void
+void
ListenToAllClients(void)
{
if (GrabInProgress)
@@ -1153,7 +1153,7 @@ ListenToAllClients(void)
* Must have cooresponding call to AttendClient.
****************/
-_X_EXPORT void
+void
IgnoreClient (ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -1188,7 +1188,7 @@ IgnoreClient (ClientPtr client)
* Adds one client back into the input masks.
****************/
-_X_EXPORT void
+void
AttendClient (ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -1213,7 +1213,7 @@ AttendClient (ClientPtr client)
/* make client impervious to grabs; assume only executing client calls this */
-_X_EXPORT void
+void
MakeClientGrabImpervious(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -1232,7 +1232,7 @@ MakeClientGrabImpervious(ClientPtr client)
/* make client pervious to grabs; assume only executing client calls this */
-_X_EXPORT void
+void
MakeClientGrabPervious(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -1262,7 +1262,7 @@ MakeClientGrabPervious(ClientPtr client)
#ifdef XQUARTZ
/* Add a fd (from launchd) to our listeners */
-_X_EXPORT void ListenOnOpenFD(int fd, int noxauth) {
+void ListenOnOpenFD(int fd, int noxauth) {
char port[256];
XtransConnInfo ciptr;
diff --git a/os/io.c b/os/io.c
index e902ee520..68f9bf0b1 100644
--- a/os/io.c
+++ b/os/io.c
@@ -82,8 +82,8 @@ SOFTWARE.
#include "dixstruct.h"
#include "misc.h"
-_X_EXPORT CallbackListPtr ReplyCallback;
-_X_EXPORT CallbackListPtr FlushCallback;
+CallbackListPtr ReplyCallback;
+CallbackListPtr FlushCallback;
static ConnectionInputPtr AllocateInputBuffer(void);
static ConnectionOutputPtr AllocateOutputBuffer(void);
@@ -191,7 +191,7 @@ YieldControlDeath(void)
timesThisConnection = 0;
}
-_X_EXPORT int
+int
ReadRequestFromClient(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -465,7 +465,7 @@ ReadRequestFromClient(ClientPtr client)
*
**********************/
-_X_EXPORT Bool
+Bool
InsertFakeRequest(ClientPtr client, char *data, int count)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -539,7 +539,7 @@ InsertFakeRequest(ClientPtr client, char *data, int count)
*
**********************/
-_X_EXPORT void
+void
ResetCurrentRequest(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -599,7 +599,7 @@ static const int padlength[4] = {0, 3, 2, 1};
*
**********************/
-_X_EXPORT void
+void
FlushAllOutput(void)
{
register int index, base;
@@ -672,14 +672,14 @@ FlushAllOutput(void)
#endif /* WIN32 */
}
-_X_EXPORT void
+void
FlushIfCriticalOutputPending(void)
{
if (CriticalOutputPending)
FlushAllOutput();
}
-_X_EXPORT void
+void
SetCriticalOutputPending(void)
{
CriticalOutputPending = TRUE;
@@ -696,7 +696,7 @@ SetCriticalOutputPending(void)
* this routine as int.
*****************/
-_X_EXPORT int
+int
WriteToClient (ClientPtr who, int count, const void *__buf)
{
OsCommPtr oc = (OsCommPtr)who->osPrivate;
@@ -1087,7 +1087,7 @@ FreeOsBuffers(OsCommPtr oc)
}
}
-_X_EXPORT void
+void
ResetOsBuffers(void)
{
ConnectionInputPtr oci;
diff --git a/os/log.c b/os/log.c
index d65932449..351090cdc 100644
--- a/os/log.c
+++ b/os/log.c
@@ -100,7 +100,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#ifdef DDXOSVERRORF
-_X_EXPORT void (*OsVendorVErrorFProc)(const char *, va_list args) = NULL;
+void (*OsVendorVErrorFProc)(const char *, va_list args) = NULL;
#endif
static FILE *logFile = NULL;
@@ -155,7 +155,7 @@ static Bool needBuffer = TRUE;
* string.
*/
-_X_EXPORT const char *
+const char *
LogInit(const char *fname, const char *backup)
{
char *logFileName = NULL;
@@ -217,7 +217,7 @@ LogInit(const char *fname, const char *backup)
return logFileName;
}
-_X_EXPORT void
+void
LogClose(void)
{
if (logFile) {
@@ -226,7 +226,7 @@ LogClose(void)
}
}
-_X_EXPORT Bool
+Bool
LogSetParameter(LogParameter param, int value)
{
switch (param) {
@@ -249,7 +249,7 @@ LogSetParameter(LogParameter param, int value)
/* This function does the actual log message writes. */
-_X_EXPORT void
+void
LogVWrite(int verb, const char *f, va_list args)
{
static char tmpBuffer[1024];
@@ -298,7 +298,7 @@ LogVWrite(int verb, const char *f, va_list args)
}
}
-_X_EXPORT void
+void
LogWrite(int verb, const char *f, ...)
{
va_list args;
@@ -308,7 +308,7 @@ LogWrite(int verb, const char *f, ...)
va_end(args);
}
-_X_EXPORT void
+void
LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
{
const char *s = X_UNKNOWN_STRING;
@@ -373,7 +373,7 @@ LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
}
/* Log message with verbosity level specified. */
-_X_EXPORT void
+void
LogMessageVerb(MessageType type, int verb, const char *format, ...)
{
va_list ap;
@@ -384,7 +384,7 @@ LogMessageVerb(MessageType type, int verb, const char *format, ...)
}
/* Log a message with the standard verbosity level of 1. */
-_X_EXPORT void
+void
LogMessage(MessageType type, const char *format, ...)
{
va_list ap;
@@ -420,7 +420,7 @@ static int nrepeat = 0;
static int oldlen = -1;
static OsTimerPtr auditTimer = NULL;
-_X_EXPORT void
+void
FreeAuditTimer(void)
{
if (auditTimer != NULL) {
@@ -451,7 +451,7 @@ AuditPrefix(void)
return tmpBuf;
}
-_X_EXPORT void
+void
AuditF(const char * f, ...)
{
va_list args;
@@ -482,7 +482,7 @@ AuditFlush(OsTimerPtr timer, CARD32 now, pointer arg)
}
}
-_X_EXPORT void
+void
VAuditF(const char *f, va_list args)
{
char *prefix;
@@ -510,7 +510,7 @@ VAuditF(const char *f, va_list args)
free(prefix);
}
-_X_EXPORT void
+void
FatalError(const char *f, ...)
{
va_list args;
@@ -535,7 +535,7 @@ FatalError(const char *f, ...)
/*NOTREACHED*/
}
-_X_EXPORT void
+void
VErrorF(const char *f, va_list args)
{
#ifdef DDXOSVERRORF
@@ -548,7 +548,7 @@ VErrorF(const char *f, va_list args)
#endif
}
-_X_EXPORT void
+void
ErrorF(const char * f, ...)
{
va_list args;
@@ -560,7 +560,7 @@ ErrorF(const char * f, ...)
/* A perror() workalike. */
-_X_EXPORT void
+void
Error(char *str)
{
char *err = NULL;
@@ -577,7 +577,7 @@ Error(char *str)
LogWrite(-1, strerror(saveErrno));
}
-_X_EXPORT void
+void
LogPrintMarkers(void)
{
/* Show what the message marker symbols mean. */
diff --git a/os/oscolor.c b/os/oscolor.c
index a066129a6..7f6b93880 100644
--- a/os/oscolor.c
+++ b/os/oscolor.c
@@ -1571,7 +1571,7 @@ static const BuiltinColor BuiltinColors[] = {
#define NUM_BUILTIN_COLORS (sizeof (BuiltinColors) / sizeof (BuiltinColors[0]))
-_X_EXPORT Bool
+Bool
OsLookupColor(int screen,
char *name,
unsigned int len,
diff --git a/os/osinit.c b/os/osinit.c
index 92bd90bcf..74e2457f2 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -79,16 +79,16 @@ SOFTWARE.
extern char *display;
#ifdef RLIMIT_DATA
-_X_EXPORT int limitDataSpace = -1;
+int limitDataSpace = -1;
#endif
#ifdef RLIMIT_STACK
-_X_EXPORT int limitStackSpace = -1;
+int limitStackSpace = -1;
#endif
#ifdef RLIMIT_NOFILE
-_X_EXPORT int limitNoFile = -1;
+int limitNoFile = -1;
#endif
-_X_EXPORT void
+void
OsInit(void)
{
static Bool been_here = FALSE;
@@ -202,7 +202,7 @@ OsInit(void)
SmartScheduleDisable = TRUE;
}
-_X_EXPORT void
+void
OsCleanup(Bool terminating)
{
if (terminating)
diff --git a/os/strcasecmp.c b/os/strcasecmp.c
index 268fa1e50..ca1051dc1 100644
--- a/os/strcasecmp.c
+++ b/os/strcasecmp.c
@@ -35,7 +35,7 @@
#include "dix.h"
#ifdef NEED_STRCASECMP
-_X_EXPORT int
+int
xstrcasecmp(const char *str1, const char *str2)
{
const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2;
@@ -51,7 +51,7 @@ xstrcasecmp(const char *str1, const char *str2)
#endif
#ifdef NEED_STRNCASECMP
-_X_EXPORT int
+int
xstrncasecmp(const char *s1, const char *s2, size_t n)
{
if (n != 0) {
diff --git a/os/strcasestr.c b/os/strcasestr.c
index cbc84f124..b3d45495c 100644
--- a/os/strcasestr.c
+++ b/os/strcasestr.c
@@ -42,7 +42,7 @@
* Find the first occurrence of find in s, ignore case.
*/
#ifdef NEED_STRCASESTR
-_X_EXPORT char *
+char *
xstrcasestr(const char *s, const char *find)
{
char c, sc;
diff --git a/os/strlcat.c b/os/strlcat.c
index b753a7a28..91ceabb1c 100644
--- a/os/strlcat.c
+++ b/os/strlcat.c
@@ -30,7 +30,7 @@
* Returns strlen(src) + MIN(siz, strlen(initial dst)).
* If retval >= siz, truncation occurred.
*/
-_X_EXPORT size_t
+size_t
strlcat(char *dst, const char *src, size_t siz)
{
register char *d = dst;
diff --git a/os/strlcpy.c b/os/strlcpy.c
index 341d0284d..aa9d042e0 100644
--- a/os/strlcpy.c
+++ b/os/strlcpy.c
@@ -27,7 +27,7 @@
* will be copied. Always NUL terminates (unless siz == 0).
* Returns strlen(src); if retval >= siz, truncation occurred.
*/
-_X_EXPORT size_t
+size_t
strlcpy(char *dst, const char *src, size_t siz)
{
register char *d = dst;
diff --git a/os/utils.c b/os/utils.c
index 6d2a9e9ab..a41b0cf28 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -121,90 +121,90 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "picture.h"
#endif
-_X_EXPORT Bool noTestExtensions;
+Bool noTestExtensions;
#ifdef COMPOSITE
-_X_EXPORT Bool noCompositeExtension = FALSE;
+Bool noCompositeExtension = FALSE;
#endif
#ifdef DAMAGE
-_X_EXPORT Bool noDamageExtension = FALSE;
+Bool noDamageExtension = FALSE;
#endif
#ifdef DBE
-_X_EXPORT Bool noDbeExtension = FALSE;
+Bool noDbeExtension = FALSE;
#endif
#ifdef DPMSExtension
-_X_EXPORT Bool noDPMSExtension = FALSE;
+Bool noDPMSExtension = FALSE;
#endif
#ifdef GLXEXT
-_X_EXPORT Bool noGlxExtension = FALSE;
-_X_EXPORT Bool noGlxVisualInit = FALSE;
+Bool noGlxExtension = FALSE;
+Bool noGlxVisualInit = FALSE;
#endif
#ifdef SCREENSAVER
-_X_EXPORT Bool noScreenSaverExtension = FALSE;
+Bool noScreenSaverExtension = FALSE;
#endif
#ifdef MITSHM
-_X_EXPORT Bool noMITShmExtension = FALSE;
+Bool noMITShmExtension = FALSE;
#endif
#ifdef MULTIBUFFER
-_X_EXPORT Bool noMultibufferExtension = FALSE;
+Bool noMultibufferExtension = FALSE;
#endif
#ifdef RANDR
-_X_EXPORT Bool noRRExtension = FALSE;
+Bool noRRExtension = FALSE;
#endif
#ifdef RENDER
-_X_EXPORT Bool noRenderExtension = FALSE;
+Bool noRenderExtension = FALSE;
#endif
#ifdef XCSECURITY
-_X_EXPORT Bool noSecurityExtension = FALSE;
+Bool noSecurityExtension = FALSE;
#endif
#ifdef RES
-_X_EXPORT Bool noResExtension = FALSE;
+Bool noResExtension = FALSE;
#endif
#ifdef XF86BIGFONT
-_X_EXPORT Bool noXFree86BigfontExtension = FALSE;
+Bool noXFree86BigfontExtension = FALSE;
#endif
#ifdef XFreeXDGA
-_X_EXPORT Bool noXFree86DGAExtension = FALSE;
+Bool noXFree86DGAExtension = FALSE;
#endif
#ifdef XF86DRI
-_X_EXPORT Bool noXFree86DRIExtension = FALSE;
+Bool noXFree86DRIExtension = FALSE;
#endif
#ifdef XF86VIDMODE
-_X_EXPORT Bool noXFree86VidModeExtension = FALSE;
+Bool noXFree86VidModeExtension = FALSE;
#endif
#ifdef XFIXES
-_X_EXPORT Bool noXFixesExtension = FALSE;
+Bool noXFixesExtension = FALSE;
#endif
/* noXkbExtension is defined in xkb/xkbInit.c */
#ifdef PANORAMIX
/* Xinerama is disabled by default unless enabled via +xinerama */
-_X_EXPORT Bool noPanoramiXExtension = TRUE;
+Bool noPanoramiXExtension = TRUE;
#endif
#ifdef XSELINUX
-_X_EXPORT Bool noSELinuxExtension = FALSE;
-_X_EXPORT int selinuxEnforcingState = SELINUX_MODE_DEFAULT;
+Bool noSELinuxExtension = FALSE;
+int selinuxEnforcingState = SELINUX_MODE_DEFAULT;
#endif
#ifdef XV
-_X_EXPORT Bool noXvExtension = FALSE;
+Bool noXvExtension = FALSE;
#endif
#ifdef DRI2
-_X_EXPORT Bool noDRI2Extension = FALSE;
+Bool noDRI2Extension = FALSE;
#endif
-_X_EXPORT Bool noGEExtension = FALSE;
+Bool noGEExtension = FALSE;
#define X_INCLUDE_NETDB_H
#include <X11/Xos_r.h>
#include <errno.h>
-_X_EXPORT Bool CoreDump;
+Bool CoreDump;
#ifdef PANORAMIX
-_X_EXPORT Bool PanoramiXExtensionDisabledHack = FALSE;
+Bool PanoramiXExtensionDisabledHack = FALSE;
#endif
-_X_EXPORT int auditTrailLevel = 1;
+int auditTrailLevel = 1;
#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
#define HAS_SAVED_IDS_AND_SETEUID
@@ -212,7 +212,7 @@ _X_EXPORT int auditTrailLevel = 1;
static char *dev_tty_from_init = NULL; /* since we need to parse it anyway */
-_X_EXPORT OsSigHandlerPtr
+OsSigHandlerPtr
OsSignal(sig, handler)
int sig;
OsSigHandlerPtr handler;
@@ -261,7 +261,7 @@ static Bool nolock = FALSE;
* contained inside is valid. If so, then die. Otherwise, create
* the lock file containing the PID.
*/
-_X_EXPORT void
+void
LockServer(void)
{
char tmp[PATH_MAX], pid_str[12];
@@ -387,7 +387,7 @@ LockServer(void)
* UnlockServer --
* Remove the server lock file.
*/
-_X_EXPORT void
+void
UnlockServer(void)
{
if (nolock) return;
@@ -401,7 +401,7 @@ UnlockServer(void)
/* Force connections to close on SIGHUP from init */
/*ARGSUSED*/
-_X_EXPORT SIGVAL
+SIGVAL
AutoResetServer (int sig)
{
int olderrno = errno;
@@ -414,7 +414,7 @@ AutoResetServer (int sig)
/* Force connections to close and then exit on SIGTERM, SIGINT */
/*ARGSUSED*/
-_X_EXPORT SIGVAL
+SIGVAL
GiveUp(int sig)
{
int olderrno = errno;
@@ -425,13 +425,13 @@ GiveUp(int sig)
}
#if defined WIN32 && defined __MINGW32__
-_X_EXPORT CARD32
+CARD32
GetTimeInMillis (void)
{
return GetTickCount ();
}
#else
-_X_EXPORT CARD32
+CARD32
GetTimeInMillis(void)
{
struct timeval tv;
@@ -447,7 +447,7 @@ GetTimeInMillis(void)
}
#endif
-_X_EXPORT void
+void
AdjustWaitForDelay (pointer waitTime, unsigned long newdelay)
{
static struct timeval delay_val;
@@ -471,7 +471,7 @@ AdjustWaitForDelay (pointer waitTime, unsigned long newdelay)
}
}
-_X_EXPORT void UseMsg(void)
+void UseMsg(void)
{
ErrorF("use: X [:<display>] [option]\n");
ErrorF("-a # mouse acceleration (pixels)\n");
@@ -577,7 +577,7 @@ VerifyDisplayName(const char *d)
* and allows ddx to handle additional fields. It is not allowed to modify
* argc or any of the strings pointed to by argv.
*/
-_X_EXPORT void
+void
ProcessCommandLine(int argc, char *argv[])
{
int i, skip;
@@ -982,7 +982,7 @@ ProcessCommandLine(int argc, char *argv[])
/* Implement a simple-minded font authorization scheme. The authorization
name is "hp-hostname-1", the contents are simply the host name. */
-_X_EXPORT int
+int
set_font_authorizations(char **authorizations, int *authlen, pointer client)
{
#define AUTHORIZATION_NAME "hp-hostname-1"
@@ -1049,7 +1049,7 @@ set_font_authorizations(char **authorizations, int *authlen, pointer client)
#ifndef INTERNAL_MALLOC
-_X_EXPORT void *
+void *
Xalloc(unsigned long amount)
{
void *ptr;
@@ -1068,7 +1068,7 @@ Xalloc(unsigned long amount)
* "no failure" realloc
*****************/
-_X_EXPORT void *
+void *
XNFalloc(unsigned long amount)
{
void *ptr;
@@ -1087,7 +1087,7 @@ XNFalloc(unsigned long amount)
* Xcalloc
*****************/
-_X_EXPORT void *
+void *
Xcalloc(unsigned long amount)
{
void *ret;
@@ -1102,7 +1102,7 @@ Xcalloc(unsigned long amount)
* XNFcalloc
*****************/
-_X_EXPORT void *
+void *
XNFcalloc(unsigned long amount)
{
void *ret;
@@ -1119,7 +1119,7 @@ XNFcalloc(unsigned long amount)
* Xrealloc
*****************/
-_X_EXPORT void *
+void *
Xrealloc(pointer ptr, unsigned long amount)
{
if ((long)amount <= 0)
@@ -1142,7 +1142,7 @@ Xrealloc(pointer ptr, unsigned long amount)
* "no failure" realloc
*****************/
-_X_EXPORT void *
+void *
XNFrealloc(pointer ptr, unsigned long amount)
{
if ((ptr = Xrealloc(ptr, amount)) == NULL)
@@ -1158,7 +1158,7 @@ XNFrealloc(pointer ptr, unsigned long amount)
* calls free
*****************/
-_X_EXPORT void
+void
Xfree(pointer ptr)
{
if (ptr)
@@ -1167,7 +1167,7 @@ Xfree(pointer ptr)
#endif /* !INTERNAL_MALLOC */
-_X_EXPORT char *
+char *
Xstrdup(const char *s)
{
char *sd;
@@ -1182,7 +1182,7 @@ Xstrdup(const char *s)
}
-_X_EXPORT char *
+char *
XNFstrdup(const char *s)
{
char *sd;
@@ -1205,7 +1205,7 @@ XNFstrdup(const char *s)
#define SMART_SCHEDULE_TIMER ITIMER_REAL
#endif
-_X_EXPORT void
+void
SmartScheduleStopTimer (void)
{
#ifdef SMART_SCHEDULE_POSSIBLE
@@ -1221,7 +1221,7 @@ SmartScheduleStopTimer (void)
#endif
}
-_X_EXPORT void
+void
SmartScheduleStartTimer (void)
{
#ifdef SMART_SCHEDULE_POSSIBLE
@@ -1245,7 +1245,7 @@ SmartScheduleTimer (int sig)
}
#endif
-_X_EXPORT Bool
+Bool
SmartScheduleInit (void)
{
#ifdef SMART_SCHEDULE_POSSIBLE
@@ -1276,7 +1276,7 @@ static sigset_t PreviousSignalMask;
static int BlockedSignalCount;
#endif
-_X_EXPORT void
+void
OsBlockSignals (void)
{
#ifdef SIG_BLOCK
@@ -1314,7 +1314,7 @@ OsBlockSignals (void)
#endif
}
-_X_EXPORT void
+void
OsReleaseSignals (void)
{
#ifdef SIG_BLOCK
@@ -1336,7 +1336,7 @@ OsReleaseSignals (void)
* as well. As it is now, xkbcomp messages don't end up in the log file.
*/
-_X_EXPORT int
+int
System(char *command)
{
int pid, p;
@@ -1395,7 +1395,7 @@ static struct pid {
OsSigHandlerPtr old_alarm = NULL; /* XXX horrible awful hack */
-_X_EXPORT pointer
+pointer
Popen(char *command, char *type)
{
struct pid *cur;
@@ -1480,7 +1480,7 @@ Popen(char *command, char *type)
}
/* fopen that drops privileges */
-_X_EXPORT pointer
+pointer
Fopen(char *file, char *type)
{
FILE *iop;
@@ -1573,7 +1573,7 @@ Fopen(char *file, char *type)
#endif /* HAS_SAVED_IDS_AND_SETEUID */
}
-_X_EXPORT int
+int
Pclose(pointer iop)
{
struct pid *cur, *last;
@@ -1613,7 +1613,7 @@ Pclose(pointer iop)
return pid == -1 ? -1 : pstat;
}
-_X_EXPORT int
+int
Fclose(pointer iop)
{
#ifdef HAS_SAVED_IDS_AND_SETEUID
@@ -1701,7 +1701,7 @@ enum BadCode {
#endif
void
-_X_EXPORT CheckUserParameters(int argc, char **argv, char **envp)
+CheckUserParameters(int argc, char **argv, char **envp)
{
enum BadCode bad = NotBad;
int i = 0, j;
@@ -1838,7 +1838,7 @@ _X_EXPORT CheckUserParameters(int argc, char **argv, char **envp)
#include <pwd.h>
#endif /* USE_PAM */
-_X_EXPORT void
+void
CheckUserAuthorization(void)
{
#ifdef USE_PAM
diff --git a/os/xprintf.c b/os/xprintf.c
index 4be4e7adc..07eaa1f58 100644
--- a/os/xprintf.c
+++ b/os/xprintf.c
@@ -43,7 +43,7 @@
# endif
#endif
-_X_EXPORT char *
+char *
Xvprintf(const char *format, va_list va)
{
char *ret;
@@ -63,7 +63,7 @@ Xvprintf(const char *format, va_list va)
return ret;
}
-_X_EXPORT char *Xprintf(const char *format, ...)
+char *Xprintf(const char *format, ...)
{
char *ret;
va_list va;
@@ -73,7 +73,7 @@ _X_EXPORT char *Xprintf(const char *format, ...)
return ret;
}
-_X_EXPORT char *
+char *
XNFvprintf(const char *format, va_list va)
{
char *ret;
@@ -93,7 +93,7 @@ XNFvprintf(const char *format, va_list va)
return ret;
}
-_X_EXPORT char *XNFprintf(const char *format, ...)
+char *XNFprintf(const char *format, ...)
{
char *ret;
va_list va;