[PATCH 08/31] os: _X_UNEXPORT

Daniel Stone daniel at fooishbar.org
Fri Dec 2 03:31:14 PST 2011


Remove _X_EXPORT tags from symbols which aren't and shouldn't be used by
drivers.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 include/client.h    |    7 +-
 include/dixstruct.h |   30 +++++-----
 include/os.h        |  162 +++++++++++++++++++++++++-------------------------
 3 files changed, 99 insertions(+), 100 deletions(-)

diff --git a/include/client.h b/include/client.h
index aaafc7d..32071f1 100644
--- a/include/client.h
+++ b/include/client.h
@@ -46,10 +46,9 @@ struct _Client;
 void ReserveClientIds(struct _Client *client);
 void ReleaseClientIds(struct _Client *client);
 
-/* Determine client IDs for caching. Exported on purpose for
- * extensions such as SELinux. */
-extern _X_EXPORT pid_t DetermineClientPid(struct _Client *client);
-extern _X_EXPORT void DetermineClientCmd(pid_t, const char **cmdname, const char **cmdargs);
+/* Determine client IDs for caching. */
+extern pid_t DetermineClientPid(struct _Client *client);
+extern void DetermineClientCmd(pid_t, const char **cmdname, const char **cmdargs);
 
 /* Query cached client IDs. Exported on purpose for drivers. */
 extern _X_EXPORT pid_t GetClientPid(struct _Client *client);
diff --git a/include/dixstruct.h b/include/dixstruct.h
index 0a85f40..1a4aece 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -38,7 +38,7 @@ SOFTWARE.
  *      translation from client ids to server addresses.
  */
 
-extern _X_EXPORT CallbackListPtr ClientStateCallback;
+extern CallbackListPtr ClientStateCallback;
 
 typedef struct {
     ClientPtr 		client;
@@ -51,7 +51,7 @@ typedef void (*ReplySwapPtr) (
 		int		/* size */,
 		void *		/* pbuf */);
 
-extern _X_EXPORT void ReplyNotSwappd (
+extern void ReplyNotSwappd (
 		ClientPtr	/* pClient */,
 		int		/* size */,
 		void *		/* pbuf */) _X_NORETURN;
@@ -128,17 +128,17 @@ typedef struct _Client {
 /*
  * Scheduling interface
  */
-extern _X_EXPORT long SmartScheduleTime;
-extern _X_EXPORT long SmartScheduleInterval;
-extern _X_EXPORT long SmartScheduleSlice;
-extern _X_EXPORT long SmartScheduleMaxSlice;
-extern _X_EXPORT Bool SmartScheduleDisable;
-extern _X_EXPORT void SmartScheduleStartTimer(void);
-extern _X_EXPORT void SmartScheduleStopTimer(void);
+extern long SmartScheduleTime;
+extern long SmartScheduleInterval;
+extern long SmartScheduleSlice;
+extern long SmartScheduleMaxSlice;
+extern Bool SmartScheduleDisable;
+extern void SmartScheduleStartTimer(void);
+extern void SmartScheduleStopTimer(void);
 #define SMART_MAX_PRIORITY  (20)
 #define SMART_MIN_PRIORITY  (-20)
 
-extern _X_EXPORT void SmartScheduleInit(void);
+extern void SmartScheduleInit(void);
 
 
 /* This prototype is used pervasively in Xext, dix */
@@ -179,14 +179,14 @@ typedef struct _CallbackList {
 
 /* proc vectors */
 
-extern _X_EXPORT int (* InitialVector[3]) (ClientPtr /*client*/);
+extern int (* InitialVector[3]) (ClientPtr /*client*/);
 
-extern _X_EXPORT int (* ProcVector[256]) (ClientPtr /*client*/);
+extern int (* ProcVector[256]) (ClientPtr /*client*/);
 
-extern _X_EXPORT int (* SwappedProcVector[256]) (ClientPtr /*client*/);
+extern int (* SwappedProcVector[256]) (ClientPtr /*client*/);
 
-extern _X_EXPORT ReplySwapPtr ReplySwapVector[256];
+extern ReplySwapPtr ReplySwapVector[256];
 
-extern _X_EXPORT int ProcBadRequest(ClientPtr /*client*/);
+extern int ProcBadRequest(ClientPtr /*client*/);
 
 #endif				/* DIXSTRUCT_H */
diff --git a/include/os.h b/include/os.h
index 2298381..379a48e 100644
--- a/include/os.h
+++ b/include/os.h
@@ -92,55 +92,55 @@ extern void ddxBeforeReset (void);
 extern _X_EXPORT void (*OsVendorVErrorFProc)(const char *, va_list args);
 #endif
 
-extern _X_EXPORT int WaitForSomething(
+extern int WaitForSomething(
     int* /*pClientsReady*/
 );
 
-extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client*/);
+extern int ReadRequestFromClient(ClientPtr /*client*/);
 
-extern _X_EXPORT Bool InsertFakeRequest(
+extern Bool InsertFakeRequest(
     ClientPtr /*client*/, 
     char* /*data*/, 
     int /*count*/);
 
 extern _X_EXPORT void ResetCurrentRequest(ClientPtr /*client*/);
 
-extern _X_EXPORT void FlushAllOutput(void);
+extern void FlushAllOutput(void);
 
-extern _X_EXPORT void FlushIfCriticalOutputPending(void);
+extern void FlushIfCriticalOutputPending(void);
 
-extern _X_EXPORT void SetCriticalOutputPending(void);
+extern void SetCriticalOutputPending(void);
 
 extern _X_EXPORT int WriteToClient(ClientPtr /*who*/, int /*count*/, const void* /*buf*/);
 
-extern _X_EXPORT void ResetOsBuffers(void);
+extern void ResetOsBuffers(void);
 
-extern _X_EXPORT void InitConnectionLimits(void);
+extern void InitConnectionLimits(void);
 
-extern _X_EXPORT void NotifyParentProcess(void);
+extern void NotifyParentProcess(void);
 
-extern _X_EXPORT void CreateWellKnownSockets(void);
+extern void CreateWellKnownSockets(void);
 
-extern _X_EXPORT void ResetWellKnownSockets(void);
+extern void ResetWellKnownSockets(void);
 
-extern _X_EXPORT void CloseWellKnownConnections(void);
+extern void CloseWellKnownConnections(void);
 
-extern _X_EXPORT XID AuthorizationIDOfClient(ClientPtr /*client*/);
+extern XID AuthorizationIDOfClient(ClientPtr /*client*/);
 
-extern _X_EXPORT char *ClientAuthorized(
+extern char *ClientAuthorized(
     ClientPtr /*client*/,
     unsigned int /*proto_n*/,
     char* /*auth_proto*/,
     unsigned int /*string_n*/,
     char* /*auth_string*/);
 
-extern _X_EXPORT Bool EstablishNewConnections(
+extern Bool EstablishNewConnections(
     ClientPtr /*clientUnused*/,
     pointer /*closure*/);
 
-extern _X_EXPORT void CheckConnections(void);
+extern void CheckConnections(void);
 
-extern _X_EXPORT void CloseDownConnection(ClientPtr /*client*/);
+extern void CloseDownConnection(ClientPtr /*client*/);
 
 extern _X_EXPORT void AddGeneralSocket(int /*fd*/);
 
@@ -150,17 +150,17 @@ extern _X_EXPORT void AddEnabledDevice(int /*fd*/);
 
 extern _X_EXPORT void RemoveEnabledDevice(int /*fd*/);
 
-extern _X_EXPORT int OnlyListenToOneClient(ClientPtr /*client*/);
+extern int OnlyListenToOneClient(ClientPtr /*client*/);
 
-extern _X_EXPORT void ListenToAllClients(void);
+extern void ListenToAllClients(void);
 
 extern _X_EXPORT void IgnoreClient(ClientPtr /*client*/);
 
 extern _X_EXPORT void AttendClient(ClientPtr /*client*/);
 
-extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client*/);
+extern void MakeClientGrabImpervious(ClientPtr /*client*/);
 
-extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client*/);
+extern void MakeClientGrabPervious(ClientPtr /*client*/);
 
 #ifdef XQUARTZ
 extern void ListenOnOpenFD(int /* fd */, int /* noxauth */);
@@ -197,18 +197,18 @@ extern _X_EXPORT void TimerCheck(void);
 extern _X_EXPORT void TimerCancel(OsTimerPtr /* pTimer */);
 extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */);
 
-extern _X_EXPORT void SetScreenSaverTimer(void);
-extern _X_EXPORT void FreeScreenSaverTimer(void);
+extern void SetScreenSaverTimer(void);
+extern void FreeScreenSaverTimer(void);
 
-extern _X_EXPORT void AutoResetServer(int /*sig*/);
+extern void AutoResetServer(int /*sig*/);
 
 extern _X_EXPORT void GiveUp(int /*sig*/);
 
-extern _X_EXPORT void UseMsg(void);
+extern void UseMsg(void);
 
-extern _X_EXPORT void ProcessCommandLine(int /*argc*/, char* /*argv*/[]);
+extern void ProcessCommandLine(int /*argc*/, char* /*argv*/[]);
 
-extern _X_EXPORT int set_font_authorizations(
+extern int set_font_authorizations(
     char ** /* authorizations */, 
     int * /*authlen */, 
     pointer /* client */);
@@ -276,15 +276,15 @@ extern _X_EXPORT char *XNFvprintf(const char *fmt, va_list va)_X_ATTRIBUTE_PRINT
 typedef void (*OsSigHandlerPtr)(int /* sig */);
 typedef int (*OsSigWrapperPtr)(int /* sig */);
 
-extern _X_EXPORT OsSigHandlerPtr OsSignal(int /* sig */, OsSigHandlerPtr /* handler */);
-extern _X_EXPORT OsSigWrapperPtr OsRegisterSigWrapper(OsSigWrapperPtr newWrap);
+extern OsSigHandlerPtr OsSignal(int /* sig */, OsSigHandlerPtr /* handler */);
+extern OsSigWrapperPtr OsRegisterSigWrapper(OsSigWrapperPtr newWrap);
 
-extern _X_EXPORT int auditTrailLevel;
+extern int auditTrailLevel;
 
-extern _X_EXPORT void LockServer(void);
-extern _X_EXPORT void UnlockServer(void);
+extern void LockServer(void);
+extern void UnlockServer(void);
 
-extern _X_EXPORT int OsLookupColor(
+extern int OsLookupColor(
     int	/*screen*/,
     char * /*name*/,
     unsigned /*len*/,
@@ -292,26 +292,26 @@ extern _X_EXPORT int OsLookupColor(
     unsigned short * /*pgreen*/,
     unsigned short * /*pblue*/);
 
-extern _X_EXPORT void OsInit(void);
+extern void OsInit(void);
 
-extern _X_EXPORT void OsCleanup(Bool);
+extern void OsCleanup(Bool);
 
-extern _X_EXPORT void OsVendorFatalError(void);
+extern void OsVendorFatalError(void);
 
-extern _X_EXPORT void OsVendorInit(void);
+extern void OsVendorInit(void);
 
 extern _X_EXPORT void OsBlockSignals (void);
 
 extern _X_EXPORT void OsReleaseSignals (void);
 
-extern _X_EXPORT void OsAbort (void) _X_NORETURN;
+extern void OsAbort (void) _X_NORETURN;
 
 #if !defined(WIN32)
-extern _X_EXPORT int System(const char *);
-extern _X_EXPORT pointer Popen(const char *, const char *);
-extern _X_EXPORT int Pclose(pointer);
-extern _X_EXPORT pointer Fopen(const char *, const char *);
-extern _X_EXPORT int Fclose(pointer);
+extern int System(const char *);
+extern pointer Popen(const char *, const char *);
+extern int Pclose(pointer);
+extern pointer Fopen(const char *, const char *);
+extern int Fclose(pointer);
 #else
 #define System(a) system(a)
 #define Popen(a,b) popen(a,b)
@@ -320,16 +320,16 @@ extern _X_EXPORT int Fclose(pointer);
 #define Fclose(a) fclose(a)
 #endif
 
-extern _X_EXPORT void CheckUserParameters(int argc, char **argv, char **envp);
-extern _X_EXPORT void CheckUserAuthorization(void);
+extern void CheckUserParameters(int argc, char **argv, char **envp);
+extern void CheckUserAuthorization(void);
 
-extern _X_EXPORT int AddHost(
+extern int AddHost(
     ClientPtr	/*client*/,
     int         /*family*/,
     unsigned    /*length*/,
     const void */*pAddr*/);
 
-extern _X_EXPORT Bool ForEachHostInFamily (
+extern Bool ForEachHostInFamily (
     int	    /*family*/,
     Bool    (* /*func*/ )(
             unsigned char * /* addr */,
@@ -337,13 +337,13 @@ extern _X_EXPORT Bool ForEachHostInFamily (
             pointer         /* closure */),
     pointer /*closure*/);
 
-extern _X_EXPORT int RemoveHost(
+extern int RemoveHost(
     ClientPtr	/*client*/,
     int         /*family*/,
     unsigned    /*length*/,
     pointer     /*pAddr*/);
 
-extern _X_EXPORT int GetHosts(
+extern int GetHosts(
     pointer * /*data*/,
     int	    * /*pnHosts*/,
     int	    * /*pLen*/,
@@ -351,11 +351,11 @@ extern _X_EXPORT int GetHosts(
 
 typedef struct sockaddr * sockaddrPtr;
 
-extern _X_EXPORT int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/, ClientPtr client);
+extern int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/, ClientPtr client);
 
-extern _X_EXPORT int LocalClient(ClientPtr /* client */);
+extern int LocalClient(ClientPtr /* client */);
 
-extern _X_EXPORT int LocalClientCred(ClientPtr, int *, int *);
+extern int LocalClientCred(ClientPtr, int *, int *);
 
 #define LCC_UID_SET	(1 << 0)
 #define LCC_GID_SET	(1 << 1)
@@ -372,44 +372,44 @@ typedef struct {
     int zoneid;		/* Only set on Solaris 10 & later */
 } LocalClientCredRec;
 
-extern _X_EXPORT int GetLocalClientCreds(ClientPtr, LocalClientCredRec **);
-extern _X_EXPORT void FreeLocalClientCreds(LocalClientCredRec *);
+extern int GetLocalClientCreds(ClientPtr, LocalClientCredRec **);
+extern void FreeLocalClientCreds(LocalClientCredRec *);
 
-extern _X_EXPORT int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/);
+extern int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/);
 
-extern _X_EXPORT int GetAccessControl(void);
+extern int GetAccessControl(void);
 
 
-extern _X_EXPORT void AddLocalHosts(void);
+extern void AddLocalHosts(void);
 
-extern _X_EXPORT void ResetHosts(char *display);
+extern void ResetHosts(char *display);
 
-extern _X_EXPORT void EnableLocalHost(void);
+extern void EnableLocalHost(void);
 
-extern _X_EXPORT void DisableLocalHost(void);
+extern void DisableLocalHost(void);
 
-extern _X_EXPORT void AccessUsingXdmcp(void);
+extern void AccessUsingXdmcp(void);
 
-extern _X_EXPORT void DefineSelf(int /*fd*/);
+extern void DefineSelf(int /*fd*/);
 
 #if XDMCP
-extern _X_EXPORT void AugmentSelf(pointer /*from*/, int /*len*/);
+extern void AugmentSelf(pointer /*from*/, int /*len*/);
 
-extern _X_EXPORT void RegisterAuthorizations(void);
+extern void RegisterAuthorizations(void);
 #endif
 
-extern _X_EXPORT void InitAuthorization(char * /*filename*/);
+extern void InitAuthorization(char * /*filename*/);
 
 /* extern int LoadAuthorization(void); */
 
-extern _X_EXPORT int AuthorizationFromID (
+extern int AuthorizationFromID (
 	XID 		id,
 	unsigned short	*name_lenp,
 	char		**namep,
 	unsigned short	*data_lenp,
 	char		**datap);
 
-extern _X_EXPORT XID CheckAuthorization(
+extern XID CheckAuthorization(
     unsigned int /*namelength*/,
     const char * /*name*/,
     unsigned int /*datalength*/,
@@ -418,22 +418,22 @@ extern _X_EXPORT XID CheckAuthorization(
     char ** /*reason*/
 );
 
-extern _X_EXPORT void ResetAuthorization(void);
+extern void ResetAuthorization(void);
 
-extern _X_EXPORT int RemoveAuthorization (
+extern int RemoveAuthorization (
     unsigned short	name_length,
     const char		*name,
     unsigned short	data_length,
     const char		*data);
 
-extern _X_EXPORT int AddAuthorization(
+extern int AddAuthorization(
     unsigned int	/*name_length*/,
     const char *	/*name*/,
     unsigned int	/*data_length*/,
     char *		/*data*/);
 
 #ifdef XCSECURITY
-extern _X_EXPORT XID GenerateAuthorization(
+extern XID GenerateAuthorization(
     unsigned int   /* name_length */,
     const char	*  /* name */,
     unsigned int   /* data_length */,
@@ -442,12 +442,12 @@ extern _X_EXPORT XID GenerateAuthorization(
     char	** /* data_return */);
 #endif
 
-extern _X_EXPORT int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
+extern int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
 
-extern _X_EXPORT void ddxUseMsg(void);
+extern void ddxUseMsg(void);
 
 /* stuff for ReplyCallback */
-extern _X_EXPORT CallbackListPtr ReplyCallback;
+extern CallbackListPtr ReplyCallback;
 typedef struct {
     ClientPtr client;
     const void *replyData;
@@ -467,9 +467,9 @@ enum ExitCode {
     EXIT_ERR_DRIVERS	= 3,
 };
 
-extern _X_EXPORT void AbortDDX(enum ExitCode error);
-extern _X_EXPORT void ddxGiveUp(enum ExitCode error);
-extern _X_EXPORT int TimeSinceLastInputEvent(void);
+extern void AbortDDX(enum ExitCode error);
+extern void ddxGiveUp(enum ExitCode error);
+extern int TimeSinceLastInputEvent(void);
 
 /* strcasecmp.c */
 #if NEED_STRCASECMP
@@ -519,9 +519,9 @@ typedef enum {
     X_UNKNOWN = -1		/* unknown -- this must always be last */
 } MessageType;
 
-extern _X_EXPORT const char *LogInit(const char *fname, const char *backup);
-extern _X_EXPORT void LogClose(enum ExitCode error);
-extern _X_EXPORT Bool LogSetParameter(LogParameter param, int value);
+extern const char *LogInit(const char *fname, const char *backup);
+extern void LogClose(enum ExitCode error);
+extern Bool LogSetParameter(LogParameter param, int value);
 extern _X_EXPORT void LogVWrite(int verb, const char *f, va_list args) _X_ATTRIBUTE_PRINTF(2,0);
 extern _X_EXPORT void LogWrite(int verb, const char *f, ...) _X_ATTRIBUTE_PRINTF(2,3);
 extern _X_EXPORT void LogVMessageVerb(MessageType type, int verb, const char *format,
@@ -556,7 +556,7 @@ extern _X_EXPORT void FatalError(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2) _X
 
 extern _X_EXPORT void VErrorF(const char *f, va_list args) _X_ATTRIBUTE_PRINTF(1,0);
 extern _X_EXPORT void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2);
-extern _X_EXPORT void LogPrintMarkers(void);
+extern void LogPrintMarkers(void);
 
 extern _X_EXPORT void xorg_backtrace(void);
 
-- 
1.7.7.3



More information about the xorg-devel mailing list