diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-02-26 12:50:12 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-02-26 13:02:00 +0100 |
commit | 0371276fb4030261878dd6cfced9abd7bcd6137f (patch) | |
tree | ccd0a621cc80b4853d6f7e262388b207db16dc4f /nx-X11/programs/Xserver | |
parent | 99fb9817f6452df63b0c9258342086b5769ba468 (diff) | |
download | nx-libs-0371276fb4030261878dd6cfced9abd7bcd6137f.tar.gz nx-libs-0371276fb4030261878dd6cfced9abd7bcd6137f.tar.bz2 nx-libs-0371276fb4030261878dd6cfced9abd7bcd6137f.zip |
hw/nxagent/: Stop using non-portable '__progname', set up our own 'nxagentProgName' instead and pass it around where needed.
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Args.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Init.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/os/utils.c | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index cf227ab23..63433f4da 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -124,7 +124,7 @@ extern int _XGetBitsPerPixel(Display *dpy, int depth); extern char dispatchExceptionAtReset; -extern const char *__progname; +const char *nxagentProgName; char nxagentDisplayName[NXAGENTDISPLAYNAMELENGTH]; Bool nxagentSynchronize = False; @@ -185,6 +185,8 @@ int ddxProcessArgument(int argc, char *argv[], int i) * Ensure that the options are set to their defaults. */ + nxagentProgName = argv[0]; + static Bool resetOptions = True; if (resetOptions == True) @@ -1185,13 +1187,13 @@ static void nxagentParseOptions(char *name, char *value) { #if !defined(PANORAMIX) && !defined(RANDR) nxagentChangeOption(Xinerama, 0); - fprintf(stderr, "Warning: No Xinerama support compiled into %s.\n", __progname); + fprintf(stderr, "Warning: No Xinerama support compiled into %s.\n", nxagentProgName); return; #else if (PANORAMIX_DISABLED_COND && RRXINERAMA_DISABLED_COND) { nxagentChangeOption(Xinerama, 0); - fprintf(stderr, "Warning: XINERAMA extension has been disabled on %s startup.\n", __progname); + fprintf(stderr, "Warning: XINERAMA extension has been disabled on %s startup.\n", nxagentProgName); return; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index 4bd61a106..598077bba 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -194,8 +194,8 @@ int nxagentX2go; void checkX2goAgent() { - extern const char *__progname; - if( strcasecmp(__progname,"x2goagent") == 0) + extern const char *nxagentProgName; + if( strcasecmp(nxagentProgName,"x2goagent") == 0) { fprintf(stderr, "\nrunning as X2Go Agent\n"); nxagentX2go=1; diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c index 01666326e..a8155f3b4 100644 --- a/nx-X11/programs/Xserver/os/utils.c +++ b/nx-X11/programs/Xserver/os/utils.c @@ -557,8 +557,8 @@ AdjustWaitForDelay (void * waitTime, unsigned long newdelay) void UseMsg(void) { #ifdef NXAGENT_SERVER - extern const char *__progname; - ErrorF("Usage: %s [<options>] [:<display>]\n\n", __progname); + extern const char *nxagentProgName; + ErrorF("Usage: %s [<options>] [:<display>]\n\n", nxagentProgName); #else ErrorF("use: X [:<display>] [option]\n"); #endif |