aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-03-28 08:55:23 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-03-28 08:55:23 +0100
commite77bf36d9afbc7e56522574b06217d57c11dd095 (patch)
tree123ed036d60c80c816474f516bc0198be58d8410 /nx-X11/programs
parentd16188f08b659a6dc2a150d84c5ed5d7bf5cf02b (diff)
downloadnx-libs-e77bf36d9afbc7e56522574b06217d57c11dd095.tar.gz
nx-libs-e77bf36d9afbc7e56522574b06217d57c11dd095.tar.bz2
nx-libs-e77bf36d9afbc7e56522574b06217d57c11dd095.zip
release 3.5.0.19
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/Imakefile29
-rw-r--r--nx-X11/programs/Xserver/Xext/panoramiX.c9
-rw-r--r--nx-X11/programs/Xserver/Xext/panoramiX.h2
-rw-r--r--nx-X11/programs/Xserver/Xext/security.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.c23
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c29
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c64
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Error.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Error.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Handlers.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Icons.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Image.c7
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Imakefile11
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Init.c28
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Init.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c46
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keystroke.c699
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keystroke.h47
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c17
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Options.c1
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Options.h7
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Render.c16
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c36
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Splash.c162
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Splash.h1
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c30
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h1
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c30
-rw-r--r--nx-X11/programs/Xserver/hw/xfree86/parser/Imakefile2
-rw-r--r--nx-X11/programs/Xserver/os/oscolor.c2
-rw-r--r--nx-X11/programs/nxauth/Imakefile2
-rw-r--r--nx-X11/programs/nxauth/nxauth.man42
-rw-r--r--nx-X11/programs/xterm/config.guess347
-rw-r--r--nx-X11/programs/xterm/config.sub255
36 files changed, 1340 insertions, 623 deletions
diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile
index 6bf7801e7..24e8850d9 100644
--- a/nx-X11/programs/Xserver/Imakefile
+++ b/nx-X11/programs/Xserver/Imakefile
@@ -313,7 +313,7 @@ XPFBLIBS = dix/LibraryTargetName(xpstubs)
FONTBASE = $(FONTLIBSRC)/fontbase.o \
$(FONTLIBSRC)/LibraryTargetName(fontbase)
#if XserverStaticFontLib
- FONT = $(FONTLIBSRC)/LibraryTargetName(Xfont) $(FREETYPE2LIB)
+ FONT = $(FONTLIBSRC)/LibraryTargetName(NX_Xfont) $(FREETYPE2LIB)
#else
FONT = $(LDPRELIB) $(XFONTLIB) $(FREETYPE2LIB)
#endif
@@ -994,7 +994,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
dix/main.o
#endif
-XPMLIB = -lXpm
+XPMLIB = -lNX_Xpm
NXAGENT = hw/nxagent/LibraryTargetName(nxagent)
NXAGENTLIBS = PreFbLibs $(NXAGENT) FbPostFbLibs $(NXAGENT) $(MI)
NXAGENTSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB)
@@ -1012,16 +1012,19 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS)
#if defined(SunArchitecture)
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \
- -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes \
- -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite
+ -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes \
+ -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xdmcp \
+`pkg-config --libs libxml-2.0`
#elif defined(cygwinArchitecture)
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \
- -lXcomp -lXcompext -lXrender -lX11 -lXext -lXcomposite -lXfixes \
- -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst
+ -lXcomp -lXcompext -lNX_Xrender -lX11 -lNX_Xext -lNX_Xcomposite -lNX_Xfixes \
+ -L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdmcp \
+`pkg-config --libs libxml-2.0`
#else
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \
- -lXcomp -lXcompext -lXcompshad -lXrender -lX11 -lXext -lXfixes \
- -L../../../nx-X11/exports/lib -lXtst -lXdamage -lXrandr -lXcomposite
+ -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes \
+ -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lNX_Xdmcp \
+`pkg-config --libs libxml-2.0`
#endif
#endif
@@ -1036,18 +1039,20 @@ NX_XSHADOWLIBDIR = $(XTOP)/../nxcompshad
NX_XSHADOWLIBTARGET = $(NX_XSHADOWLIBDIR)/$(NX_XSHADOWLIBNAME)
NX_XSHADOWCONFIGTARGET = $(NX_XSHADOWLIBDIR)/config.status
+CONFIGURE ?= ./configure
+
$(NX_XSHADOWCONFIGTARGET):
cd $(NX_XSHADOWLIBDIR) && \
- ./configure
+ ${CONFIGURE}
#ifdef SunArchitecture
$(NX_XSHADOWLIBTARGET): $(NX_XSHADOWCONFIGTARGET)
cd $(NX_XSHADOWLIBDIR) && \
- gmake
+ ${MAKE}
#else
$(NX_XSHADOWLIBTARGET): $(NX_XSHADOWCONFIGTARGET)
cd $(NX_XSHADOWLIBDIR) && \
- make
+ rm -f *.o && ${MAKE}
#endif
ServerTarget(nxagent,$(NX_XSHADOWLIBTARGET) $(NXAGENTDIRS),$(NXAGENTOBJS), \
@@ -1073,7 +1078,7 @@ nxagent_static_nolibs: nxagent
else exit 0; fi
$(CCLINK) -o nxagent_static_nolibs -Wl,-Bstatic $(LDOPTIONS) $(NXAGENTOBJS) \
$(NXAGENTLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER) $(LDLIBS) $(FONTLIBS) \
- $(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lXext -lX11 $(EXTRA_LOAD_FLAGS)
+ $(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lNX_Xext -lNX_X11 $(EXTRA_LOAD_FLAGS)
#endif /* NXAgentServer */
#if defined(XnonServer) && XnonServer
diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c
index 33faedc57..a1a5b9f1f 100644
--- a/nx-X11/programs/Xserver/Xext/panoramiX.c
+++ b/nx-X11/programs/Xserver/Xext/panoramiX.c
@@ -1045,16 +1045,7 @@ ProcXineramaIsActive(ClientPtr client)
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
-#if 1
- {
- /* The following hack fools clients into thinking that Xinerama
- * is disabled even though it is not. */
- extern Bool PanoramiXExtensionDisabledHack;
- rep.state = !noPanoramiXExtension && !PanoramiXExtensionDisabledHack;
- }
-#else
rep.state = !noPanoramiXExtension;
-#endif
if (client->swapped) {
register int n;
swaps (&rep.sequenceNumber, n);
diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.h b/nx-X11/programs/Xserver/Xext/panoramiX.h
index 5fa4ed35c..4178b985f 100644
--- a/nx-X11/programs/Xserver/Xext/panoramiX.h
+++ b/nx-X11/programs/Xserver/Xext/panoramiX.h
@@ -44,7 +44,7 @@ Equipment Corporation.
#define _PANORAMIX_H_
#include <X11/extensions/panoramiXext.h>
-#include "gcstruct.h"
+/*#include "gcstruct.h"*/
typedef struct _PanoramiXData {
diff --git a/nx-X11/programs/Xserver/Xext/security.c b/nx-X11/programs/Xserver/Xext/security.c
index 2139425b4..fc3bb99e6 100644
--- a/nx-X11/programs/Xserver/Xext/security.c
+++ b/nx-X11/programs/Xserver/Xext/security.c
@@ -86,7 +86,7 @@ extern unsigned char LbxReqCode;
#ifdef NXAGENT_SERVER
-#define NX_ALTERNATIVEPOLICYFILE "/usr/lib/xserver/SecurityPolicy"
+#define NX_ALTERNATIVEPOLICYFILE "/usr/share/nx/SecurityPolicy"
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index ecf04e226..fad0b62d8 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -148,6 +148,8 @@ static int nxagentGetDialogName(void);
char nxagentVerbose = 0;
+char *nxagentKeystrokeFile = NULL;
+
int ddxProcessArgument(int argc, char *argv[], int i)
{
/*
@@ -672,6 +674,12 @@ int ddxProcessArgument(int argc, char *argv[], int i)
return 1;
}
+ if (!strcmp(argv[i], "-norootlessexit")) {
+ nxagentChangeOption(NoRootlessExit, True);
+ return 1;
+ }
+
+
if (!strcmp(argv[i], "-noonce"))
{
nxagentOnce = False;
@@ -1015,6 +1023,20 @@ int ddxProcessArgument(int argc, char *argv[], int i)
return 1;
}
+ if (!strcmp(argv[i], "-keystrokefile"))
+ {
+ if (i + 1 < argc)
+ {
+ if (NULL != (nxagentKeystrokeFile = strdup(argv[i + 1])))
+ {
+ return 2;
+ } else {
+ FatalError("malloc failed");
+ }
+ }
+ return 0;
+ }
+
return 0;
}
@@ -1855,6 +1877,7 @@ void ddxUseMsg()
ErrorF("The NX system adds the following arguments:\n");
ErrorF("-forcenx force use of NX protocol messages assuming communication through nxproxy\n");
ErrorF("-timeout int auto-disconnect timeout in seconds (minimum allowed: 60)\n");
+ ErrorF("-norootlessexit don't exit if there are no clients in rootless mode\n");
#ifdef RENDER
ErrorF("-norender disable the use of the render extension\n");
ErrorF("-nocomposite disable the use of the composite extension\n");
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.h b/nx-X11/programs/Xserver/hw/nxagent/Args.h
index 8f4d05d6c..85734be23 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.h
@@ -83,4 +83,6 @@ extern int nxagentUserDefinedFontPath;
extern int nxagentRemoteMajor;
+extern char *nxagentKeystrokeFile;
+
#endif /* __Args_H__ */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 2742e147f..d4fa4a979 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -166,7 +166,9 @@ Bool nxagentValidServerTargets(Atom target)
if (target == XA_STRING) return True;
if (target == serverTEXT) return True;
-
+ /* by dimbor */
+ if (target == serverUTF8_STRING) return True;
+
return False;
}
@@ -402,7 +404,12 @@ FIXME: Do we need this?
lastServerProperty = X->xselectionrequest.property;
lastServerRequestor = X->xselectionrequest.requestor;
lastServerTarget = X->xselectionrequest.target;
- lastServerTime = X->xselectionrequest.time;
+
+ /* by dimbor */
+ if (lastServerTarget != XA_STRING)
+ lastServerTarget = serverUTF8_STRING;
+
+ lastServerTime = X->xselectionrequest.time;
x.u.u.type = SelectionRequest;
x.u.selectionRequest.time = GetTimeInMillis();
@@ -424,11 +431,12 @@ FIXME: Do we need this?
x.u.selectionRequest.selection = CurrentSelections[i].selection;
- /*
- * x.u.selectionRequest.target = X->xselectionrequest.target;
- */
-
- x.u.selectionRequest.target = XA_STRING;
+ /* by dimbor (idea from zahvatov) */
+ if (X->xselectionrequest.target != XA_STRING)
+ x.u.selectionRequest.target = clientUTF8_STRING;
+ else
+ x.u.selectionRequest.target = XA_STRING;
+
x.u.selectionRequest.property = clientCutProperty;
(void) TryClientEvents(lastSelectionOwner[i].client, &x, 1,
@@ -1218,10 +1226,11 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
Atom xa_STRING[4];
xEvent x;
+ /* --- Order changed by dimbor (prevent sending COMPOUND_TEXT to client --- */
xa_STRING[0] = XA_STRING;
- xa_STRING[1] = clientTEXT;
- xa_STRING[2] = clientCOMPOUND_TEXT;
- xa_STRING[3] = clientUTF8_STRING;
+ xa_STRING[1] = clientUTF8_STRING;
+ xa_STRING[2] = clientTEXT;
+ xa_STRING[3] = clientCOMPOUND_TEXT;
ChangeWindowProperty(pWin,
property,
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index 9031c25c7..b01d66cb0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -77,6 +77,7 @@ is" without express or implied warranty.
#include "NXlib.h"
#include NXAGENT_ICON_NAME
+#include X2GOAGENT_ICON_NAME
/*
* Set here the required log level.
@@ -1429,22 +1430,10 @@ FIXME: Use of nxagentParentWindow is strongly deprecated.
g = pV.green_mask;
b = pV.blue_mask;
- if (!pV.red_mask || !pV.green_mask || !pV.blue_mask)
- {
- nxagentLogoBlack = 0x000000;
- nxagentLogoRed = 0xff0000;
- nxagentLogoWhite = 0xffffff;
- }
- else
- {
- for (or=0, off=0x800000; (r&(off>>or)) == 0; or++);
- for (og=0, off=0x800000; (g&(off>>og)) == 0; og++);
- for (ob=0, off=0x800000; (b&(off>>ob)) == 0; ob++);
-
- nxagentLogoRed = nxagentLogoColor(0xff0000);
- nxagentLogoBlack = nxagentLogoColor(0x000000);
- nxagentLogoWhite = 0xffffff;
- }
+ nxagentLogoBlack = 0x000000;
+ nxagentLogoRed = 0xff0000;
+ nxagentLogoWhite = 0xffffff;
+ nxagentLogoGray = 0x222222;
#ifdef WATCH
@@ -1941,12 +1930,29 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask)
Bool success = False;
XlibPixmap IconPixmap;
XlibPixmap IconShape;
+ char* agent_icon_name;
+ char* agentIconData;
+
+ /*
+ * selecting x2go icon when running as X2Go agent
+ */
+ if(nxagentX2go)
+ {
+ agent_icon_name=X2GOAGENT_ICON_NAME;
+ agentIconData=x2goagentIconData;
+ }
+ else
+ {
+ agent_icon_name=NXAGENT_ICON_NAME;
+ agentIconData=nxagentIconData;
+ }
- snprintf(default_path, PATH_MAX-1, "/usr/NX/share/images/%s", NXAGENT_ICON_NAME);
+
+ snprintf(default_path, PATH_MAX-1, "/usr/NX/share/images/%s", agent_icon_name);
if ((icon_fp = fopen(default_path, "r")) == NULL)
{
- icon_fp = nxagentLookForIconFile(NXAGENT_ICON_NAME, "r", icon_path);
+ icon_fp = nxagentLookForIconFile(agent_icon_name, "r", icon_path);
if (icon_fp != NULL)
{
@@ -1985,7 +1991,7 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask)
{
status = XpmCreatePixmapFromData(display,
DefaultRootWindow(display),
- nxagentIconData,
+ agentIconData,
&IconPixmap,
&IconShape,
NULL);
@@ -2678,22 +2684,10 @@ Bool nxagentReconnectDisplay(void *p0)
g = pV.green_mask;
b = pV.blue_mask;
- if (!pV.red_mask || !pV.green_mask || !pV.blue_mask)
- {
- nxagentLogoBlack = 0x000000;
- nxagentLogoRed = 0xff0000;
- nxagentLogoWhite = 0xffffff;
- }
- else
- {
- for (or=0, off=0x800000; (r&(off>>or)) == 0; or++);
- for (og=0, off=0x800000; (g&(off>>og)) == 0; og++);
- for (ob=0, off=0x800000; (b&(off>>ob)) == 0; ob++);
-
- nxagentLogoRed = nxagentLogoColor(0xff0000);
- nxagentLogoBlack = nxagentLogoColor(0x000000);
- nxagentLogoWhite = 0xffffff;
- }
+ nxagentLogoBlack = 0x000000;
+ nxagentLogoRed = 0xff0000;
+ nxagentLogoWhite = 0xffffff;
+ nxagentLogoGray = 0x222222;
useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Error.c b/nx-X11/programs/Xserver/hw/nxagent/Error.c
index 43bf85900..31ff4cf25 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Error.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c
@@ -497,7 +497,7 @@ char *nxagentGetRootPath(void)
return rootPath;
}
-char *nxagentGetSessionPath()
+char *nxagentGetSessionPath(void)
{
char *rootPath;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Error.h b/nx-X11/programs/Xserver/hw/nxagent/Error.h
index e55fd71a5..51d6171da 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Error.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Error.h
@@ -34,4 +34,6 @@ void nxagentStartRedirectToClientsLog(void);
void nxagentEndRedirectToClientsLog(void);
+char *nxagentGetSessionPath(void);
+
#endif /* __Error_H__ */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
index 332816fe0..1fc6bbf8b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
@@ -219,7 +219,7 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
if (nxagentOption(Rootless) &&
nxagentLastWindowDestroyed && nxagentRootlessDialogPid == 0 &&
- now > nxagentLastWindowDestroyedTime + 30 * 1000)
+ now > nxagentLastWindowDestroyedTime + 30 * 1000 && !nxagentOption(NoRootlessExit))
{
#ifdef WARNING
fprintf(stderr, "nxagentBlockHandler: No application running. Closing the session.\n");
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Icons.h b/nx-X11/programs/Xserver/hw/nxagent/Icons.h
index 0601584d4..98e879662 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Icons.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Icons.h
@@ -24,6 +24,8 @@
#define NXAGENT_ICON_NAME "nxagent.xpm"
+#define X2GOAGENT_ICON_NAME "x2go.xpm"
+
#define NXAGENT_PLACEHOLDER_NAME "nxmissing.xpm"
#endif /* __Icons_H__ */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c
index e499b7a11..1f0b735b0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Image.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c
@@ -644,6 +644,10 @@ FIXME: Should use these.
pDrawable -> depth != 1 &&
nxagentOption(DeferLevel) >= 1)
{
+ /* -- changed by dimbor (small "bed-sheets" never need be prevented - always put) --*/
+ if (dstHeight > 16)
+ {
+ /* -------------------------------------------------------------------------------- */
#ifdef TEST
fprintf(stderr, "nxagentPutImage: WARNING! Prevented operation on region [%d,%d,%d,%d] "
"for drawable at [%p] with drawable pixmap.\n", pRegion -> extents.x1,
@@ -654,6 +658,9 @@ FIXME: Should use these.
nxagentMarkCorruptedRegion(pDrawable, pRegion);
goto nxagentPutImageEnd;
+ /* --- changed by dimbor ---*/
+ }
+ /* ------------------------- */
}
if (pDrawable -> type == DRAWABLE_WINDOW &&
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
index 96579583b..d812c7f70 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile
+++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
@@ -142,7 +142,8 @@ INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../
-I../../miext/damage -I../../miext/cw \
-I../../GL/glx -I../../GL/include -I../../../../lib/GL/include -I../../Xext \
-I$(EXTINCSRC) -I$(XINCLUDESRC) \
- $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES)
+ $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \
+ `pkg-config --cflags-only-I libxml-2.0`
#ifdef SunArchitecture
INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../../nxcompshad \
-I../../../../extras/Mesa/include \
@@ -152,7 +153,8 @@ INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../
-I../../GL/glx -I../../GL/include -I../../../../lib/GL/include -I../../Xext \
-I../../miext/damage -I../../miext/cw \
-I$(EXTINCSRC) -I$(XINCLUDESRC) \
- $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES)
+ $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \
+ `pkg-config --cflags-only-I libxml-2.0`
#else
#ifdef cygwinArchitecture
INCLUDES = -I. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \
@@ -162,7 +164,8 @@ INCLUDES = -I. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \
-I../../../../../nxcomp -I../../../../../nxcompext -I../../../../../nxcompshad \
-I../../../../extras/Mesa/include \
-I$(EXTINCSRC) -I$(XINCLUDESRC) \
- $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES)
+ $(VFBINCLUDES) $(NXFONTINCLUDES) $(LIBXRANDRINCLUDES) \
+ `pkg-config --cflags-only-I libxml-2.0`
#endif
#endif
@@ -206,7 +209,7 @@ DEFINES = -g $(OS_DEFINES) $(EXT_DEFINES) $(UPG_DEFINES) \
-UNX_DEBUG_INPUT \
-DRANDR_10_INTERFACE \
-DRANDR_12_INTERFACE \
- -UPANORAMIX \
+ -DPANORAMIX \
-UDEBUG_TREE
all:: $(OBJS)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c
index a50e8a5fc..a4c341a2f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Init.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c
@@ -177,6 +177,29 @@ int nxagentSaveUnder;
int nxagentDoFullGeneration = 1;
+ /*
+ * 1 if agent running as X2goAgent
+ * 0 if NX Agent
+ */
+int nxagentX2go;
+
+/*
+ * Checking if agent is x2go agent
+ */
+
+void checkX2goAgent()
+{
+ extern const char *__progname;
+ if( strcasecmp(__progname,"x2goagent") == 0)
+ {
+ fprintf(stderr, "\nrunning as X2Go Agent\n");
+ nxagentX2go=1;
+ }
+ else
+ nxagentX2go=0;
+}
+
+
/*
* Called at X server's initialization.
*/
@@ -193,6 +216,11 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
#endif
/*
+ * Check if we running as X2Go Agent
+ */
+ checkX2goAgent();
+
+ /*
* Print our pid and version information.
*/
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.h b/nx-X11/programs/Xserver/hw/nxagent/Init.h
index 2dc0f5c02..b516c7b34 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Init.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.h
@@ -37,6 +37,8 @@ extern int nxagentDoFullGeneration;
extern int nxagentBackingStore;
extern int nxagentSaveUnder;
+extern int nxagentX2go;
+
extern ServerGrabInfoRec nxagentGrabServerInfo;
#endif /* __Init_H__ */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index e3b58b6c7..dfafe1ebb 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -52,6 +52,7 @@ is" without express or implied warranty.
#include "Keyboard.h"
#include "Events.h"
#include "Options.h"
+#include "Error.h"
#include "NXlib.h"
@@ -136,7 +137,7 @@ extern Status XkbGetControls(
#define XKB_ALTERNATE_BASE_DIRECTORY "/usr/X11R6/lib/X11/xkb"
#endif
#ifndef XKB_CONFIG_FILE
-#define XKB_CONFIG_FILE "X0-config.keyboard"
+#define XKB_CONFIG_FILE "/etc/nxagent/nxagent.keyboard"
#endif
#ifndef XKB_DFLT_RULES_FILE
#define XKB_DFLT_RULES_FILE "xfree86"
@@ -985,8 +986,7 @@ XkbError:
XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb);
- nxagentXkbConfigFilePathSize = strlen(XkbBaseDirectory) +
- strlen(XKB_CONFIG_FILE) + 1;
+ nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE);
nxagentXkbConfigFilePath = malloc((nxagentXkbConfigFilePathSize + 1) * sizeof(char));
@@ -995,9 +995,7 @@ XkbError:
FatalError("nxagentKeyboardProc: malloc failed.");
}
- strcpy(nxagentXkbConfigFilePath, XkbBaseDirectory);
- strcat(nxagentXkbConfigFilePath, "/");
- strcat(nxagentXkbConfigFilePath, XKB_CONFIG_FILE);
+ strcpy(nxagentXkbConfigFilePath, XKB_CONFIG_FILE);
#ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: nxagentXkbConfigFilePath [%s].\n",
@@ -1793,6 +1791,42 @@ void nxagentKeycodeConversionSetup(void)
}
#endif
+ if (drulesLen != 0)
+ {
+ char *sessionpath = nxagentGetSessionPath();
+ if (sessionpath != NULL){
+ int keyboard_file_path_size = strlen(sessionpath) + strlen("/keyboard");
+ char *keyboard_file_path = malloc((keyboard_file_path_size + 1) * sizeof(char));
+ FILE *keyboard_file;
+ if ( keyboard_file_path == NULL)
+ {
+ FatalError("nxagentKeyboardProc: malloc failed.");
+ }
+ strcpy(keyboard_file_path, sessionpath);
+ strcat(keyboard_file_path, "/keyboard");
+ if ((keyboard_file = fopen(keyboard_file_path, "w")) != NULL) {
+ if ( drules != NULL )
+ fprintf(keyboard_file, "rules=%s\n", drules);
+ if ( dmodel != NULL )
+ fprintf(keyboard_file, "model=%s\n", dmodel);
+ if ( dlayout != NULL )
+ fprintf(keyboard_file, "layout=%s\n", dlayout);
+ if ( dvariant != NULL )
+ fprintf(keyboard_file, "variant=%s\n", dvariant);
+ if ( doptions != NULL )
+ fprintf(keyboard_file, "options=%s\n", doptions);
+ fclose(keyboard_file);
+ }
+ free(keyboard_file_path);
+ fprintf(stderr, "keyboard file created\n");
+ }
+ fprintf(stderr, "SessionPath not defined\n");
+ }
+ else
+ {
+ fprintf(stderr, "Failed to create the keyboard file\n");
+ }
+
if (nxagentOption(ClientOs) == ClientOsLinux &&
drules != NULL && dmodel != NULL &&
(strcmp(drules, "evdev") == 0 ||
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
index 6c6e477ab..694781c7e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
@@ -28,8 +28,15 @@
#include "Keystroke.h"
#include "Drawable.h"
+#include <unistd.h>
+
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
extern Bool nxagentWMIsRunning;
extern Bool nxagentIpaq;
+extern char *nxagentKeystrokeFile;
+Bool nxagentKeystrokeFileParsed = False;
#ifdef NX_DEBUG_INPUT
int nxagentDebugInputDevices = 0;
@@ -47,10 +54,369 @@ extern void nxagentDeactivateInputDevicesGrabs();
#undef DEBUG
#undef DUMP
+
+/* this table is used to parse actions given on the command line or in the
+ * config file, therefore indices have to match the enum in Keystroke.h */
+char * nxagentSpecialKeystrokeNames[] = {
+ "end_marker",
+ "close_session",
+ "switch_all_screens",
+ "minimize",
+ "left",
+ "up",
+ "right",
+ "down",
+ "resize",
+ "defer",
+ "ignore",
+ "force_synchronization",
+
+ "debug_tree",
+ "regions_on_screen",
+ "test_input",
+ "deactivate_input_devices_grab",
+
+ "fullscreen",
+ "viewport_move_left",
+ "viewport_move_up",
+ "viewport_move_right",
+ "viewport_move_down",
+ NULL,
+};
+
+struct nxagentSpecialKeystrokeMap default_map[] = {
+ /* stroke, modifierMask, modifierAltMeta, keysym */
+ {KEYSTROKE_DEBUG_TREE, ControlMask, 1, XK_q},
+ {KEYSTROKE_DEBUG_TREE, ControlMask, 1, XK_Q},
+ {KEYSTROKE_CLOSE_SESSION, ControlMask, 1, XK_t},
+ {KEYSTROKE_CLOSE_SESSION, ControlMask, 1, XK_T},
+ {KEYSTROKE_SWITCH_ALL_SCREENS, ControlMask, 1, XK_f},
+ {KEYSTROKE_SWITCH_ALL_SCREENS, ControlMask, 1, XK_F},
+ {KEYSTROKE_MINIMIZE, ControlMask, 1, XK_m},
+ {KEYSTROKE_MINIMIZE, ControlMask, 1, XK_M},
+ {KEYSTROKE_LEFT, ControlMask, 1, XK_Left},
+ {KEYSTROKE_LEFT, ControlMask, 1, XK_KP_Left},
+ {KEYSTROKE_UP, ControlMask, 1, XK_Up},
+ {KEYSTROKE_UP, ControlMask, 1, XK_KP_Up},
+ {KEYSTROKE_RIGHT, ControlMask, 1, XK_Right},
+ {KEYSTROKE_RIGHT, ControlMask, 1, XK_KP_Right},
+ {KEYSTROKE_DOWN, ControlMask, 1, XK_Down},
+ {KEYSTROKE_DOWN, ControlMask, 1, XK_KP_Down},
+ {KEYSTROKE_RESIZE, ControlMask, 1, XK_r},
+ {KEYSTROKE_RESIZE, ControlMask, 1, XK_R},
+ {KEYSTROKE_DEFER, ControlMask, 1, XK_e},
+ {KEYSTROKE_DEFER, ControlMask, 1, XK_E},
+ {KEYSTROKE_IGNORE, ControlMask, 1, XK_BackSpace},
+ {KEYSTROKE_IGNORE, 0, 0, XK_Terminate_Server},
+ {KEYSTROKE_FORCE_SYNCHRONIZATION, ControlMask, 1, XK_j},
+ {KEYSTROKE_FORCE_SYNCHRONIZATION, ControlMask, 1, XK_J},
+ {KEYSTROKE_REGIONS_ON_SCREEN, ControlMask, 1, XK_a},
+ {KEYSTROKE_REGIONS_ON_SCREEN, ControlMask, 1, XK_A},
+ {KEYSTROKE_TEST_INPUT, ControlMask, 1, XK_x},
+ {KEYSTROKE_TEST_INPUT, ControlMask, 1, XK_X},
+ {KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB, ControlMask, 1, XK_y},
+ {KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB, ControlMask, 1, XK_Y},
+ {KEYSTROKE_FULLSCREEN, ControlMask | ShiftMask, 1, XK_f},
+ {KEYSTROKE_FULLSCREEN, ControlMask | ShiftMask, 1, XK_F},
+ {KEYSTROKE_VIEWPORT_MOVE_LEFT, ControlMask | ShiftMask, 1, XK_Left},
+ {KEYSTROKE_VIEWPORT_MOVE_LEFT, ControlMask | ShiftMask, 1, XK_KP_Left},
+ {KEYSTROKE_VIEWPORT_MOVE_UP, ControlMask | ShiftMask, 1, XK_Up},
+ {KEYSTROKE_VIEWPORT_MOVE_UP, ControlMask | ShiftMask, 1, XK_KP_Up},
+ {KEYSTROKE_VIEWPORT_MOVE_RIGHT, ControlMask | ShiftMask, 1, XK_Right},
+ {KEYSTROKE_VIEWPORT_MOVE_RIGHT, ControlMask | ShiftMask, 1, XK_KP_Right},
+ {KEYSTROKE_VIEWPORT_MOVE_DOWN, ControlMask | ShiftMask, 1, XK_Down},
+ {KEYSTROKE_VIEWPORT_MOVE_DOWN, ControlMask | ShiftMask, 1, XK_KP_Down},
+ {KEYSTROKE_END_MARKER, 0, 0, 0},
+};
+struct nxagentSpecialKeystrokeMap *map = default_map;
+
+static int modifier_matches(unsigned int mask, int compare_alt_meta, unsigned int state)
+{
+ /* nxagentAltMetaMask needs special handling
+ * it seems to me its an and-ed mask of all possible meta and alt keys
+ * somehow...
+ *
+ * otherwise this function would be just a simple bitop
+ */
+ int ret = 1;
+
+ if (compare_alt_meta) {
+ if (! (state & nxagentAltMetaMask)) {
+ ret = 0;
+ }
+
+ mask &= ~nxagentAltMetaMask;
+ }
+
+ /* all modifiers except meta/alt have to match exactly, extra bits are evil */
+ if ((mask & state) != mask) {
+ ret = 0;
+ }
+
+ return ret;
+}
+
+static int read_binding_from_xmlnode(xmlNode *node, struct nxagentSpecialKeystrokeMap *ret)
+{
+ int successful = 0;
+ struct nxagentSpecialKeystrokeMap new = {0, 0, 0, 0};
+ xmlAttr *attr;
+
+ for (attr = node->properties; attr; attr = attr->next)
+ {
+ /* ignore attributes without data (which should never happen anyways) */
+ if (attr->children->content == NULL)
+ {
+ char *aname = (attr->name)?(attr->name):"unknown";
+ fprintf(stderr, "attribute %s with NULL value", aname);
+ continue;
+ }
+ if (strcmp((char *)attr->name, "action") == 0)
+ {
+ int i;
+ for (i = 0; nxagentSpecialKeystrokeNames[i] != NULL; i++)
+ {
+ if (strcmp(nxagentSpecialKeystrokeNames[i],(char *)attr->children->content) == 0)
+ {
+ /* this relies on the values of enum nxagentSpecialKeystroke and the
+ * indices of nxagentSpecialKeystrokeNames being in sync */
+ new.stroke = i;
+ break;
+ }
+ }
+ continue;
+ }
+ else if (strcmp((char *)attr->name, "key") == 0)
+ {
+ new.keysym = XStringToKeysym((char *)attr->children->content);
+ /* NoSymbol is usually 0, but could there be weird implementations? */
+ if (new.keysym == NoSymbol)
+ {
+ new.keysym = 0;
+ }
+ continue;
+ }
+
+ /* ignore attributes with value="0" or "false", everything else is interpreted as true */
+ if (strcmp((char *)attr->children->content, "0") == 0 || strcmp((char *)attr->children->content, "false") == 0)
+ continue;
+
+ if (strcmp((char *)attr->name, "Mod1") == 0)
+ {
+ new.modifierMask |= Mod1Mask;
+ }
+ else if (strcmp((char *)attr->name, "Mod2") == 0)
+ {
+ new.modifierMask |= Mod2Mask;
+ }
+ else if (strcmp((char *)attr->name, "Mod3") == 0)
+ {
+ new.modifierMask |= Mod3Mask;
+ }
+ else if (strcmp((char *)attr->name, "Mod4") == 0)
+ {
+ new.modifierMask |= Mod4Mask;
+ }
+ else if (strcmp((char *)attr->name, "Control") == 0)
+ {
+ new.modifierMask |= ControlMask;
+ }
+ else if (strcmp((char *)attr->name, "Shift") == 0)
+ {
+ new.modifierMask |= ShiftMask;
+ }
+ else if (strcmp((char *)attr->name, "Lock") == 0)
+ {
+ new.modifierMask |= LockMask;
+ }
+ else if (strcmp((char *)attr->name, "AltMeta") == 0)
+ {
+ new.modifierAltMeta = 1;
+ }
+ }
+
+ if (new.stroke != 0 && new.keysym != 0)
+ {
+ /* keysym and stroke are required, everything else is optional */
+ successful = 1;
+ memcpy(ret, &new, sizeof(struct nxagentSpecialKeystrokeMap));
+ }
+ return successful;
+}
+
+/*
+ * searches a keystroke xml file
+ *
+ * search order:
+ * - '-keystrokefile' commandline parameter
+ * - $NXAGENT_KEYSTROKEFILE environment variable
+ * - $HOME/.nx/config/keystroke.cfg
+ * - /etc/nx/keystroke.cfg
+ * - hardcoded traditional NX default settings
+ */
+static void parse_keystroke_file(void)
+{
+ char *filename = NULL;
+
+ char *homefile = "/.nx/config/keystroke.cfg";
+ char *etcfile = "/etc/nx/keystroke.cfg";
+
+ if (nxagentKeystrokeFile != NULL && access(nxagentKeystrokeFile, R_OK) == 0)
+ {
+ filename = strdup(nxagentKeystrokeFile);
+ if (filename == NULL)
+ {
+ fprintf(stderr, "malloc failed");
+ exit(EXIT_FAILURE);
+ }
+ }
+ else if ((filename = getenv("NXAGENT_KEYSTROKEFILE")) != NULL && access(filename, R_OK) == 0)
+ {
+ filename = strdup(filename);
+ if (filename == NULL)
+ {
+ fprintf(stderr, "malloc failed");
+ exit(EXIT_FAILURE);
+ }
+ }
+ else
+ {
+ char *homedir = getenv("HOME");
+ filename = NULL;
+ if (homedir != NULL)
+ {
+ homedir = strdup(homedir);
+ if (homedir == NULL)
+ {
+ fprintf(stderr, "malloc failed");
+exit(EXIT_FAILURE);
+ }
+ filename = calloc(1, strlen(homefile) + strlen(homedir) + 1);
+ if (filename == NULL)
+ {
+ fprintf(stderr, "malloc failed");
+ exit(EXIT_FAILURE);
+ }
+ strcpy(filename, homedir);
+ strcpy(filename + strlen(homedir), homefile);
+ if (homedir)
+ {
+ free(homedir);
+ }
+ }
+
+ if (access(filename, R_OK) == 0)
+ {
+ /* empty */
+ }
+ else if (access(etcfile, R_OK == 0))
+ {
+ if (filename)
+ free(filename);
+ filename = strdup(etcfile);
+ if (filename == NULL)
+ {
+ fprintf(stderr, "malloc failed");
+ exit(EXIT_FAILURE);
+ }
+ }
+ else
+ {
+ if (filename)
+free(filename);
+ filename = NULL;
+ }
+ }
+
+ /* now we know which file to read, if any */
+ if (filename)
+ {
+ xmlDoc *doc = NULL;
+ xmlNode *root = NULL;
+ LIBXML_TEST_VERSION
+ doc = xmlReadFile(filename, NULL, 0);
+ if (doc != NULL)
+ {
+ xmlNode *cur = NULL;
+ root = xmlDocGetRootElement(doc);
+
+ for (cur = root; cur; cur = cur->next)
+ {
+ if (cur->type == XML_ELEMENT_NODE && strcmp((char *)cur->name, "keystrokes") == 0)
+{
+ xmlNode *bindings = NULL;
+ int num = 0;
+ int idx = 0;
+
+ for (bindings = cur->children; bindings; bindings = bindings->next)
+ {
+ if (bindings->type == XML_ELEMENT_NODE && strcmp((char *)bindings->name, "keystroke") == 0)
+ {
+ num++;
+ }
+ }
+ map = calloc((num + 1), sizeof(struct nxagentSpecialKeystrokeMap));
+ if (map == NULL)
+ {
+ fprintf(stderr, "malloc failed");
+ exit(EXIT_FAILURE);
+ }
+
+ for (bindings = cur->children; bindings; bindings = bindings->next)
+ {
+ if (bindings->type == XML_ELEMENT_NODE && strcmp((char *)bindings->name, "keystroke") == 0)
+ {
+ int res = 0;
+ res = read_binding_from_xmlnode(bindings, &(map[idx]));
+ if (res)
+ idx++;
+ }
+ }
+
+ map[idx].stroke = KEYSTROKE_END_MARKER;
+ }
+ }
+
+ xmlFreeDoc(doc);
+ xmlCleanupParser();
+ }
+ else
+ {
+ #ifdef DEBUG
+ fprintf("XML parsing for %s failed\n", filename);
+ #endif
+ }
+ free(filename);
+ }
+}
+
+static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X)
+{
+ KeySym keysym = XKeycodeToKeysym(nxagentDisplay, X->keycode, 0);
+ struct nxagentSpecialKeystrokeMap *cur = map;
+
+ if (! nxagentKeystrokeFileParsed)
+ {
+ parse_keystroke_file();
+ nxagentKeystrokeFileParsed = True;
+ }
+
+ enum nxagentSpecialKeystroke ret = KEYSTROKE_NOTHING;
+
+ while ((cur++)->stroke != KEYSTROKE_END_MARKER) {
+ if (cur->keysym == keysym && modifier_matches(cur->modifierMask, cur->modifierAltMeta, X->state)) {
+ return cur->stroke;
+ }
+ }
+
+ return ret;
+}
+
int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
{
KeySym sym;
int index = 0;
+ enum nxagentSpecialKeystroke stroke = find_keystroke(X);
*result = doNothing;
@@ -87,257 +453,128 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
return 1;
}
- if ((X -> state & nxagentAltMetaMask) &&
- ((X -> state & (ControlMask | ShiftMask)) == ControlMask))
- {
- switch (sym)
- {
+ switch (stroke) {
+ case KEYSTROKE_DEBUG_TREE:
#ifdef DEBUG_TREE
-
- case XK_q:
- case XK_Q:
- {
- *result = doDebugTree;
-
- break;
- }
-
- #endif /* DEBUG_TREE */
-
- case XK_t:
- case XK_T:
- {
- *result = doCloseSession;
-
- break;
- }
- case XK_f:
- case XK_F:
- {
- if (nxagentOption(Rootless) == False)
- {
- *result = doSwitchAllScreens;
- }
-
- break;
- }
- case XK_m:
- case XK_M:
- {
- if (nxagentOption(Rootless) == False)
- {
- *result = doMinimize;
- }
-
- break;
- }
- case XK_Left:
- case XK_KP_Left:
- {
- if (nxagentOption(Rootless) == False &&
- nxagentOption(DesktopResize) == False)
- {
- *result = doViewportLeft;
- }
-
- break;
- }
- case XK_Up:
- case XK_KP_Up:
- {
- if (nxagentOption(Rootless) == False &&
- nxagentOption(DesktopResize) == False)
- {
- *result = doViewportUp;
- }
-
- break;
+ *result = doDebugTree;
+ #endif
+ break;
+ case KEYSTROKE_CLOSE_SESSION:
+ *result = doCloseSession;
+ break;
+ case KEYSTROKE_SWITCH_ALL_SCREENS:
+ if (nxagentOption(Rootless) == False) {
+ *result = doSwitchAllScreens;
}
- case XK_Right:
- case XK_KP_Right:
- {
- if (nxagentOption(Rootless) == False &&
- nxagentOption(DesktopResize) == False)
- {
- *result = doViewportRight;
- }
-
- break;
+ break;
+ case KEYSTROKE_MINIMIZE:
+ if (nxagentOption(Rootless) == False) {
+ *result = doMinimize;
}
- case XK_Down:
- case XK_KP_Down:
- {
- if (nxagentOption(Rootless) == 0 &&
- nxagentOption(DesktopResize) == 0)
- {
- *result = doViewportDown;
- }
-
- break;
+ break;
+ case KEYSTROKE_LEFT:
+ if (nxagentOption(Rootless) == False &&
+ nxagentOption(DesktopResize) == False) {
+ *result = doViewportLeft;
}
- case XK_R:
- case XK_r:
- {
- if (nxagentOption(Rootless) == 0)
- {
- *result = doSwitchResizeMode;
- }
-
- break;
+ break;
+ case KEYSTROKE_UP:
+ if (nxagentOption(Rootless) == False &&
+ nxagentOption(DesktopResize) == False) {
+ *result = doViewportUp;
}
- case XK_E:
- case XK_e:
- {
- *result = doSwitchDeferMode;
-
- break;
+ break;
+ case KEYSTROKE_RIGHT:
+ if (nxagentOption(Rootless) == False &&
+ nxagentOption(DesktopResize) == False) {
+ *result = doViewportRight;
}
- case XK_BackSpace:
- case XK_Terminate_Server:
- {
- /*
- * Discard Ctrl-Alt-BackSpace key.
- */
-
- return 1;
-
- break;
+ break;
+ case KEYSTROKE_DOWN:
+ if (nxagentOption(Rootless) == False &&
+ nxagentOption(DesktopResize) == False) {
+ *result = doViewportDown;
}
-
- case XK_J:
- case XK_j:
- {
- nxagentForceSynchronization = 1;
-
- return 1;
+ break;
+ case KEYSTROKE_RESIZE:
+ if (nxagentOption(Rootless) == False) {
+ *result = doSwitchResizeMode;
}
-
+ break;
+ case KEYSTROKE_DEFER:
+ *result = doSwitchDeferMode;
+ break;
+ case KEYSTROKE_IGNORE:
+ /* this is used e.g. to ignore C-A-Backspace aka XK_Terminate_Server */
+ return 1;
+ break;
+ case KEYSTROKE_FORCE_SYNCHRONIZATION:
+ nxagentForceSynchronization = 1;
+ break;
+ case KEYSTROKE_REGIONS_ON_SCREEN:
#ifdef DUMP
-
- case XK_A:
- case XK_a:
- {
- /*
- * Used to test the lazy encoding.
- */
-
- nxagentRegionsOnScreen();
-
- return 1;
- }
-
+ nxagentRegionsOnScreen();
#endif
-
+ break;
+ case KEYSTROKE_TEST_INPUT:
+ /*
+ * Used to test the input devices state.
+ */
#ifdef NX_DEBUG_INPUT
-
- case XK_X:
- case XK_x:
- {
- /*
- * Used to test the input devices state.
- */
-
- if (X -> type == KeyPress)
- {
- if (nxagentDebugInputDevices == 0)
- {
- fprintf(stderr, "Info: Turning input devices debug ON.\n");
-
- nxagentDebugInputDevices = 1;
- }
- else
- {
- fprintf(stderr, "Info: Turning input devices debug OFF.\n");
-
- nxagentDebugInputDevices = 0;
-
- nxagentLastInputDevicesDumpTime = 0;
- }
+ if (X -> type == KeyPress) {
+ if (nxagentDebugInputDevices == 0) {
+ fprintf(stderr, "Info: Turning input devices debug ON.\n");
+ nxagentDebugInputDevices = 1;
+ } else {
+ fprintf(stderr, "Info: Turning input devices debug OFF.\n");
+ nxagentDebugInputDevices = 0;
+ nxagentLastInputDevicesDumpTime = 0;
}
-
- return 1;
}
-
- case XK_Y:
- case XK_y:
- {
- /*
- * Used to deactivate input devices grab.
- */
-
- if (X -> type == KeyPress)
- {
- nxagentDeactivateInputDevicesGrabs();
- }
-
- return 1;
+ return 1;
+ #endif
+ break;
+ case KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB:
+ #ifdef NX_DEBUG_INPUT
+ if (X->type == KeyPress) {
+ nxagentDeactivateInputDevicesGrab();
}
-
+ return 1;
#endif
- }
- }
- else if ((X -> state & nxagentAltMetaMask) &&
- ((X -> state & (ControlMask | ShiftMask)) == (ControlMask |
- ShiftMask)))
- {
- switch (sym)
- {
- case XK_f:
- case XK_F:
- {
- if (nxagentOption(Rootless) == 0)
- {
- *result = doSwitchFullscreen;
- }
-
- break;
+ break;
+ case KEYSTROKE_FULLSCREEN:
+ if (nxagentOption(Rootless) == 0) {
+ *result = doSwitchFullscreen;
}
- case XK_Left:
- case XK_KP_Left:
- {
- if (nxagentOption(Rootless) == 0 &&
- nxagentOption(DesktopResize) == 0)
- {
- *result = doViewportMoveLeft;
- }
-
- break;
+ break;
+ case KEYSTROKE_VIEWPORT_MOVE_LEFT:
+ if (nxagentOption(Rootless) == 0 &&
+ nxagentOption(DesktopResize) == 0) {
+ *result = doViewportMoveLeft;
}
- case XK_Up:
- case XK_KP_Up:
- {
- if (nxagentOption(Rootless) == 0 &&
- nxagentOption(DesktopResize) == 0)
- {
- *result = doViewportMoveUp;
- }
-
- break;
+ break;
+ case KEYSTROKE_VIEWPORT_MOVE_UP:
+ if (nxagentOption(Rootless) == 0 &&
+ nxagentOption(DesktopResize) == 0) {
+ *result = doViewportMoveUp;
}
- case XK_Right:
- case XK_KP_Right:
- {
- if (nxagentOption(Rootless) == 0 &&
- nxagentOption(DesktopResize) == 0)
- {
- *result = doViewportMoveRight;
- }
-
- break;
+ break;
+ case KEYSTROKE_VIEWPORT_MOVE_RIGHT:
+ if (nxagentOption(Rootless) == 0 &&
+ nxagentOption(DesktopResize) == 0) {
+ *result = doViewportMoveRight;
}
- case XK_Down:
- case XK_KP_Down:
- {
- if (nxagentOption(Rootless) == 0 &&
- nxagentOption(DesktopResize) == 0)
- {
- *result = doViewportMoveDown;
- }
-
- break;
+ break;
+ case KEYSTROKE_VIEWPORT_MOVE_DOWN:
+ if (nxagentOption(Rootless) == 0 &&
+ nxagentOption(DesktopResize) == 0) {
+ *result = doViewportMoveDown;
}
- }
+ break;
+ case KEYSTROKE_NOTHING: /* do nothing. difference to KEYSTROKE_IGNORE is the return value */
+ case KEYSTROKE_END_MARKER: /* just to make gcc STFU */
+ case KEYSTROKE_MAX:
+ break;
}
-
return (*result == doNothing) ? 0 : 1;
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h
index ef71a8851..d9575c875 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h
@@ -24,4 +24,51 @@ extern int nxagentCheckSpecialKeystroke(XKeyEvent*, enum HandleEventResult*);
unsigned int nxagentAltMetaMask;
+/* keep this sorted, do not rely on any numerical value in this enum, and be aware
+ * that KEYSTROKE_MAX may be used in a malloc */
+
+/* also be aware that if changing any numerical values, you also need to change values
+ * Keystroke.c nxagentSpecialKeystrokeNames */
+enum nxagentSpecialKeystroke {
+ /* 0 is used as end marker */
+ KEYSTROKE_END_MARKER = 0,
+ KEYSTROKE_CLOSE_SESSION = 1,
+ KEYSTROKE_SWITCH_ALL_SCREENS = 2,
+ KEYSTROKE_MINIMIZE = 3,
+ KEYSTROKE_LEFT = 4,
+ KEYSTROKE_UP = 5,
+ KEYSTROKE_RIGHT = 6,
+ KEYSTROKE_DOWN = 7,
+ KEYSTROKE_RESIZE = 8,
+ KEYSTROKE_DEFER = 9,
+ KEYSTROKE_IGNORE = 10,
+ KEYSTROKE_FORCE_SYNCHRONIZATION = 11,
+
+ /* stuff used for debugging, probably not useful for most people */
+ KEYSTROKE_DEBUG_TREE = 12,
+ KEYSTROKE_REGIONS_ON_SCREEN = 13,
+ KEYSTROKE_TEST_INPUT = 14,
+ KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB = 15,
+
+ KEYSTROKE_FULLSCREEN = 16,
+ KEYSTROKE_VIEWPORT_MOVE_LEFT = 17,
+ KEYSTROKE_VIEWPORT_MOVE_UP = 18,
+ KEYSTROKE_VIEWPORT_MOVE_RIGHT = 19,
+ KEYSTROKE_VIEWPORT_MOVE_DOWN = 20,
+
+ KEYSTROKE_NOTHING = 21,
+
+ /* insert more here, increment KEYSTROKE_MAX accordingly.
+ * then update string translation below */
+
+ KEYSTROKE_MAX=22,
+};
+
+struct nxagentSpecialKeystrokeMap {
+ enum nxagentSpecialKeystroke stroke;
+ unsigned int modifierMask; /* everything except alt/meta */
+ int modifierAltMeta; /* modifier combination should include alt/meta */
+ KeySym keysym;
+};
+
#endif /* __Keystroke_H__ */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
index 4f59b8098..77e2bf473 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
@@ -1973,6 +1973,23 @@ ProcCreatePixmap(client)
client->errorValue = 0;
return BadValue;
}
+ if (stuff->width > 32767 || stuff->height > 32767)
+ {
+ /* It is allowed to try and allocate a pixmap which is larger than
+ * 32767 in either dimension. However, all of the framebuffer code
+ * is buggy and does not reliably draw to such big pixmaps, basically
+ * because the Region data structure operates with signed shorts
+ * for the rectangles in it.
+ *
+ * Furthermore, several places in the X server computes the
+ * size in bytes of the pixmap and tries to store it in an
+ * integer. This integer can overflow and cause the allocated size
+ * to be much smaller.
+ *
+ * So, such big pixmaps are rejected here with a BadAlloc
+ */
+ return BadAlloc;
+ }
if (stuff->depth != 1)
{
pDepth = pDraw->pScreen->allowedDepths;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.c b/nx-X11/programs/Xserver/hw/nxagent/Options.c
index ca5be0b5f..7eac3d8a2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Options.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c
@@ -56,6 +56,7 @@ void nxagentInitOptions()
nxagentOptions.Persistent = 1;
nxagentOptions.Rootless = UNDEFINED;
nxagentOptions.Fullscreen = UNDEFINED;
+ nxagentOptions.NoRootlessExit = False;
nxagentOptions.X = 0;
nxagentOptions.Y = 0;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.h b/nx-X11/programs/Xserver/hw/nxagent/Options.h
index 40cb1790e..0e4869926 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Options.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h
@@ -381,6 +381,13 @@ typedef struct _AgentOptions
int ImageRateLimit;
+ /*
+ * True if agent should not exit if there are no
+ * clients in rootless mode
+ */
+
+ int NoRootlessExit;
+
} AgentOptionsRec;
typedef AgentOptionsRec *AgentOptionsPtr;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c
index 29bffaa35..41a1ec02e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Render.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c
@@ -2689,11 +2689,17 @@ void nxagentReconnectPicture(pointer p0, XID x1, void *p2)
#endif
}
- if (!pForm)
- {
- *pBool = False;
-
- return;
+ if (!pForm && pPicture->pSourcePict)
+ {
+ /*possible we need to add support for other picture types, for example gradients...*/
+ switch(pPicture->pSourcePict->type)
+ {
+ case SourcePictTypeSolidFill:
+ nxagentPicturePriv(pPicture) -> picture = XRenderCreateSolidFill(nxagentDisplay,
+ (const XRenderColor*) &pPicture->pSourcePict->solidFill.fullColor);
+ break;
+ }
+ return;
}
#ifdef TEST
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 9957a7dfd..104d431e0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -1759,6 +1759,42 @@ N/A
nxagentDefaultWindows[pScreen->myNum]);
#endif
+ /*
+ * Setting WM_CLASS to "X2GoAgent" when running in X2Go Agent mode
+ * we need it to properly display all window parameters by some WMs
+ * (for example on Maemo)
+ */
+ if(nxagentX2go)
+ {
+ #ifdef TEST
+ fprintf(stderr, "nxagentOpenScreen: Setting WM_CLASS and WM_NAME for window withid [%ld].\n",
+ nxagentDefaultWindows[pScreen->myNum]);
+ #endif
+ XClassHint hint;
+ hint.res_name=malloc(strlen("X2GoAgent")+1);
+ hint.res_class=malloc(strlen("X2GoAgent")+1);
+ strcpy(hint.res_name,"X2GoAgent");
+ strcpy(hint.res_class,"X2GoAgent");
+ XSetClassHint(nxagentDisplay,nxagentDefaultWindows[pScreen->myNum],&hint);
+ free(hint.res_name);
+ free(hint.res_class);
+ } else {
+ #ifdef TEST
+ fprintf(stderr, "nxagentOpenScreen: Setting WM_CLASS and WM_NAME for window withid [%ld].\n",
+ nxagentDefaultWindows[pScreen->myNum]);
+ #endif
+
+ XClassHint hint;
+ hint.res_name=malloc(strlen("NXAgent")+1);
+ hint.res_class=malloc(strlen("NXAgent")+1);
+ strcpy(hint.res_name,"NXAgent");
+ strcpy(hint.res_class,"NXAgent");
+ XSetClassHint(nxagentDisplay,nxagentDefaultWindows[pScreen->myNum],&hint);
+ free(hint.res_name);
+ free(hint.res_class);
+ }
+
+
if (nxagentOption(Fullscreen))
{
nxagentFullscreenWindow = nxagentDefaultWindows[pScreen->myNum];
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
index 235c48c23..abb0872d1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
@@ -35,6 +35,7 @@
#include "Windows.h"
#include "Atoms.h"
#include "Trap.h"
+#include "Init.h"
/*
* Set here the required log level.
@@ -53,6 +54,7 @@ int nxagentLogoDepth;
int nxagentLogoWhite;
int nxagentLogoRed;
int nxagentLogoBlack;
+int nxagentLogoGray;
void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height);
@@ -166,6 +168,15 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
XPoint m[12];
int w, h, c, w2, h2;
+ /*
+ * Show only X2GO Logo when running as X2Go Agent
+ */
+ if(! nxagentX2go)
+ {
+ nxagentPixmapLogo = 0L;
+ return;
+ }
+
#ifdef DEBUG
fprintf(stderr, "nxagenShowtLogo: Got called.\n");
#endif
@@ -218,75 +229,146 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
XSetForeground(nxagentDisplay, gc, nxagentLogoRed);
XSetBackground(nxagentDisplay, gc, nxagentLogoWhite);
- rect[0].x = w2-10*c; rect[0].y = h2-8*c;
- rect[1].x = w2-10*c; rect[1].y = h2+8*c;
- rect[2].x = w2+10*c; rect[2].y = h2+8*c;
- rect[3].x = w2+10*c; rect[3].y = h2-8*c;
+ /*
+ * Draw X2GO Logo
+ */
+ /*
+ * Begin 'X'.
+ */
+
+ XSetForeground(nxagentDisplay, gc, nxagentLogoGray);
+ XSetBackground(nxagentDisplay, gc, nxagentLogoWhite);
+ rect[0].x = w2-7*c; rect[0].y = h2-5*c;
+ rect[1].x = w2-8*c; rect[1].y = h2-5*c;
+ rect[2].x = w2-4*c; rect[2].y = h2+3*c;
+ rect[3].x = w2-3*c; rect[3].y = h2+3*c;
XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
- #ifdef NXAGENT_LOGO_DEBUG
- fprintf(stderr, "filled red rect\n");
- #endif
+ rect[0].x = w2-4*c; rect[0].y = h2-5*c;
+ rect[1].x = w2-3*c; rect[1].y = h2-5*c;
+ rect[2].x = w2-7*c; rect[2].y = h2+3*c;
+ rect[3].x = w2-8*c; rect[3].y = h2+3*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
- rect[0].x = w2-9*c; rect[0].y = h2-7*c;
- rect[1].x = w2-9*c; rect[1].y = h2+7*c;
- rect[2].x = w2+9*c; rect[2].y = h2+7*c;
- rect[3].x = w2+9*c; rect[3].y = h2-7*c;
+ /*
+ * End 'X'.
+ */
- XSetForeground(nxagentDisplay, gc, nxagentLogoWhite);
- XSetBackground(nxagentDisplay, gc, nxagentLogoRed);
+ /*
+ * Start '2'.
+ */
+
+ rect[0].x = w2-2*c; rect[0].y = h2-5*c;
+ rect[1].x = w2-1*c; rect[1].y = h2-5*c;
+ rect[2].x = w2-1*c; rect[2].y = h2-3*c;
+ rect[3].x = w2-2*c; rect[3].y = h2-3*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
+
+ rect[0].x = w2-2*c; rect[0].y = h2-5*c;
+ rect[1].x = w2+2*c; rect[1].y = h2-5*c;
+ rect[2].x = w2+2*c; rect[2].y = h2-4*c;
+ rect[3].x = w2-2*c; rect[3].y = h2-4*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
+ rect[0].x = w2+1*c; rect[0].y = h2-5*c;
+ rect[1].x = w2+2*c; rect[1].y = h2-5*c;
+ rect[2].x = w2+2*c; rect[2].y = h2-2*c;
+ rect[3].x = w2+1*c; rect[3].y = h2-2*c;
XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
+ rect[0].x = w2+2*c; rect[0].y = h2-2*c;
+ rect[1].x = w2+1*c; rect[1].y = h2-2*c;
+ rect[2].x = w2-2*c; rect[2].y = h2+2*c;
+ rect[3].x = w2-1*c; rect[3].y = h2+2*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
+
+
+ rect[0].x = w2-2*c; rect[0].y = h2+2*c;
+ rect[1].x = w2+2*c; rect[1].y = h2+2*c;
+ rect[2].x = w2+2*c; rect[2].y = h2+3*c;
+ rect[3].x = w2-2*c; rect[3].y = h2+3*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
/*
- * Begin 'M'.
+ * End '2'.
*/
- m[0].x = w2-3*c; m[0].y = h2-5*c;
- m[1].x = w2+7*c; m[1].y = h2-5*c;
- m[2].x = w2+7*c; m[2].y = h2+5*c;
- m[3].x = w2+5*c; m[3].y = h2+5*c;
- m[4].x = w2+5*c; m[4].y = h2-3*c;
- m[5].x = w2+3*c; m[5].y = h2-3*c;
- m[6].x = w2+3*c; m[6].y = h2+5*c;
- m[7].x = w2+1*c; m[7].y = h2+5*c;
- m[8].x = w2+1*c; m[8].y = h2-3*c;
- m[9].x = w2-1*c; m[9].y = h2-3*c;
- m[10].x = w2-1*c; m[10].y = h2+5*c;
- m[11].x = w2-3*c; m[11].y = h2+5*c;
+ /*
+ * Start 'G'.
+ */
- XSetForeground(nxagentDisplay, gc, nxagentLogoRed);
- XSetBackground(nxagentDisplay, gc, nxagentLogoWhite);
+ rect[0].x = w2+3*c; rect[0].y = h2-5*c;
+ rect[1].x = w2+7*c; rect[1].y = h2-5*c;
+ rect[2].x = w2+7*c; rect[2].y = h2-4*c;
+ rect[3].x = w2+3*c; rect[3].y = h2-4*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
- XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, m, 12, Nonconvex, CoordModeOrigin);
+ rect[0].x = w2+3*c; rect[0].y = h2-5*c;
+ rect[1].x = w2+4*c; rect[1].y = h2-5*c;
+ rect[2].x = w2+4*c; rect[2].y = h2+3*c;
+ rect[3].x = w2+3*c; rect[3].y = h2+3*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
+ rect[0].x = w2+3*c; rect[0].y = h2+2*c;
+ rect[1].x = w2+7*c; rect[1].y = h2+2*c;
+ rect[2].x = w2+7*c; rect[2].y = h2+3*c;
+ rect[3].x = w2+3*c; rect[3].y = h2+3*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
+
+ rect[0].x = w2+6*c; rect[0].y = h2-5*c;
+ rect[1].x = w2+7*c; rect[1].y = h2-5*c;
+ rect[2].x = w2+7*c; rect[2].y = h2-3*c;
+ rect[3].x = w2+6*c; rect[3].y = h2-3*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
+
+ rect[0].x = w2+6*c; rect[0].y = h2-0*c;
+ rect[1].x = w2+7*c; rect[1].y = h2-0*c;
+ rect[2].x = w2+7*c; rect[2].y = h2+3*c;
+ rect[3].x = w2+6*c; rect[3].y = h2+3*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
+
+ rect[0].x = w2+5*c; rect[0].y = h2-1*c;
+ rect[1].x = w2+7*c; rect[1].y = h2-1*c;
+ rect[2].x = w2+7*c; rect[2].y = h2+0*c;
+ rect[3].x = w2+5*c; rect[3].y = h2+0*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
/*
- * End 'M'.
+ * End 'G'.
*/
/*
- * Begin '!'.
+ * Start 'O'.
*/
- rect[0].x = w2-7*c; rect[0].y = h2-5*c;
- rect[1].x = w2-5*c; rect[1].y = h2-5*c;
- rect[2].x = w2-5*c; rect[2].y = h2+2*c;
- rect[3].x = w2-7*c; rect[3].y = h2+2*c;
+ rect[0].x = w2+8*c; rect[0].y = h2-5*c;
+ rect[1].x = w2+12*c; rect[1].y = h2-5*c;
+ rect[2].x = w2+12*c; rect[2].y = h2-4*c;
+ rect[3].x = w2+8*c; rect[3].y = h2-4*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
+ rect[0].x = w2+8*c; rect[0].y = h2+3*c;
+ rect[1].x = w2+12*c; rect[1].y = h2+3*c;
+ rect[2].x = w2+12*c; rect[2].y = h2+2*c;
+ rect[3].x = w2+8*c; rect[3].y = h2+2*c;
XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
- rect[0].x = w2-7*c; rect[0].y = h2+3*c;
- rect[1].x = w2-5*c; rect[1].y = h2+3*c;
- rect[2].x = w2-5*c; rect[2].y = h2+5*c;
- rect[3].x = w2-7*c; rect[3].y = h2+5*c;
+ rect[0].x = w2+8*c; rect[0].y = h2-5*c;
+ rect[1].x = w2+9*c; rect[1].y = h2-5*c;
+ rect[2].x = w2+9*c; rect[2].y = h2+3*c;
+ rect[3].x = w2+8*c; rect[3].y = h2+3*c;
+ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
+ rect[0].x = w2+11*c; rect[0].y = h2-5*c;
+ rect[1].x = w2+12*c; rect[1].y = h2-5*c;
+ rect[2].x = w2+12*c; rect[2].y = h2+3*c;
+ rect[3].x = w2+11*c; rect[3].y = h2+3*c;
XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
/*
- * End 'M'.
+ * End 'O'.
*/
+
XSetWindowBackgroundPixmap(nxagentDisplay, win, nxagentPixmapLogo);
#ifdef NXAGENT_LOGO_DEBUG
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h
index f7ba6c2e2..39becaa3d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h
@@ -33,6 +33,7 @@ extern int nxagentLogoDepth;
extern int nxagentLogoWhite;
extern int nxagentLogoRed;
extern int nxagentLogoBlack;
+extern int nxagentLogoGray;
extern Window nxagentSplashWindow;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index 35a35984a..0a8e8c29b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -176,6 +176,14 @@ static void nxagentReconfigureWindow(pointer, XID, pointer);
static int nxagentForceExposure(WindowPtr pWin, pointer ptr);
+/* by dimbor */
+typedef struct
+{
+ CARD32 state;
+ Window icon;
+}
+nxagentWMStateRec;
+
/*
* This is currently unused.
*/
@@ -1858,6 +1866,17 @@ Bool nxagentRealizeWindow(WindowPtr pWin)
nxagentAddConfiguredWindow(pWin, CWStackingOrder);
nxagentAddConfiguredWindow(pWin, CW_Shape);
+ /* add by dimbor */
+ if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin))
+ {
+ Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True);
+ nxagentWMStateRec wmState;
+ wmState.state = 1; /* NormalState */
+ wmState.icon = None;
+ if (ChangeWindowProperty(pWin, prop, prop, 32, 0, 2, &wmState, 1) != Success)
+ fprintf(stderr, "nxagentRealizeWindow: Additing WM_STATE fail.\n");
+ }
+
#ifdef SHAPE
/*
@@ -1904,6 +1923,17 @@ Bool nxagentUnrealizeWindow(pWin)
return True;
}
+ /* add by dimbor */
+ if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin))
+ {
+ Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True);
+ nxagentWMStateRec wmState;
+ wmState.state = 3; /* WithdrawnState */
+ wmState.icon = None;
+ if (ChangeWindowProperty(pWin, prop, prop, 32, 0, 2, &wmState, 1) != Success)
+ fprintf(stderr, "nxagentUnRealizeWindow: Changing WM_STATE failed.\n");
+ }
+
XUnmapWindow(nxagentDisplay, nxagentWindow(pWin));
return True;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c
index d9054b4b6..4b342ebcf 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c
@@ -1137,6 +1137,10 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error)
}
pPicture->pSourcePict->type = SourcePictTypeSolidFill;
pPicture->pSourcePict->solidFill.color = xRenderColorToCard32(*color);
+ pPicture->pSourcePict->solidFill.fullColor.alpha=color->alpha;
+ pPicture->pSourcePict->solidFill.fullColor.red=color->red;
+ pPicture->pSourcePict->solidFill.fullColor.green=color->green;
+ pPicture->pSourcePict->solidFill.fullColor.blue=color->blue;
return pPicture;
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h
index 0d1a8e1d8..b2679257c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h
@@ -95,6 +95,7 @@ typedef struct _PictTransform {
typedef struct _PictSolidFill {
unsigned int type;
CARD32 color;
+ xRenderColor fullColor;
} PictSolidFill, *PictSolidFillPtr;
typedef struct _PictGradientStop {
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c
index f6dad312a..cbb3f63e8 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXxvdisp.c
@@ -275,17 +275,19 @@ ProcXvDispatch(ClientPtr client)
case xv_PutVideo:
#ifdef PANORAMIX
if(!noPanoramiXExtension)
- result = (XineramaXvPutVideo(client)); break;
+ result = (XineramaXvPutVideo(client));
else
#endif
- result = (ProcXvPutVideo(client)); break;
+ result = (ProcXvPutVideo(client));
+ break;
case xv_PutStill:
#ifdef PANORAMIX
if(!noPanoramiXExtension)
- result = (XineramaXvPutStill(client)); break
+ result = (XineramaXvPutStill(client));
else
#endif
- result = (ProcXvPutStill(client)); break;
+ result = (ProcXvPutStill(client));
+ break;
case xv_GetVideo: result = (ProcXvGetVideo(client)); break;
case xv_GetStill: result = (ProcXvGetStill(client)); break;
case xv_GrabPort: result = (ProcXvGrabPort(client)); break;
@@ -295,35 +297,39 @@ ProcXvDispatch(ClientPtr client)
case xv_StopVideo:
#ifdef PANORAMIX
if(!noPanoramiXExtension)
- result = (XineramaXvStopVideo(client)); break;
+ result = (XineramaXvStopVideo(client));
else
#endif
- result = (ProcXvStopVideo(client)); break;
+ result = (ProcXvStopVideo(client));
+ break;
case xv_SetPortAttribute:
#ifdef PANORAMIX
if(!noPanoramiXExtension)
- result = (XineramaXvSetPortAttribute(client)); break;
+ result = (XineramaXvSetPortAttribute(client));
else
#endif
- result = (ProcXvSetPortAttribute(client)); break;
+ result = (ProcXvSetPortAttribute(client));
+ break;
case xv_GetPortAttribute: result = (ProcXvGetPortAttribute(client)); break;
case xv_QueryBestSize: result = (ProcXvQueryBestSize(client)); break;
case xv_QueryPortAttributes: result = (ProcXvQueryPortAttributes(client)); break;
case xv_PutImage:
#ifdef PANORAMIX
if(!noPanoramiXExtension)
- result = (XineramaXvPutImage(client)); break;
+ result = (XineramaXvPutImage(client));
else
#endif
- result = (ProcXvPutImage(client)); break;
+ result = (ProcXvPutImage(client));
+ break;
#ifdef MITSHM
case xv_ShmPutImage:
#ifdef PANORAMIX
if(!noPanoramiXExtension)
- result = (XineramaXvShmPutImage(client)); break;
+ result = (XineramaXvShmPutImage(client));
else
#endif
- result = (ProcXvShmPutImage(client)); break;
+ result = (ProcXvShmPutImage(client));
+ break;
#endif
case xv_QueryImageAttributes: result = (ProcXvQueryImageAttributes(client)); break;
case xv_ListImageFormats: result = (ProcXvListImageFormats(client)); break;
diff --git a/nx-X11/programs/Xserver/hw/xfree86/parser/Imakefile b/nx-X11/programs/Xserver/hw/xfree86/parser/Imakefile
index 29708b64b..8513c51fa 100644
--- a/nx-X11/programs/Xserver/hw/xfree86/parser/Imakefile
+++ b/nx-X11/programs/Xserver/hw/xfree86/parser/Imakefile
@@ -7,7 +7,7 @@
#define DoDebugLib NO
#define DoProfileLib NO
#define HasSharedData NO
-#define LibName xf86config
+#define LibName NX_xf86config
#define UseDBMalloc NO
diff --git a/nx-X11/programs/Xserver/os/oscolor.c b/nx-X11/programs/Xserver/os/oscolor.c
index cf79857f4..ea99450bc 100644
--- a/nx-X11/programs/Xserver/os/oscolor.c
+++ b/nx-X11/programs/Xserver/os/oscolor.c
@@ -53,7 +53,7 @@ SOFTWARE.
#include <sys/stat.h>
#include <unistd.h>
-static char* nxAltRgbPaths[] = {"/usr/NX/share/rgb", "/usr/share/X11/rgb", "/etc/X11/rgb"};
+static char* nxAltRgbPaths[] = {"/usr/share/nx/rgb", "/usr/local/share/nx/rgb", "/usr/NX/share/rgb", "/usr/share/X11/rgb", "/etc/X11/rgb"};
static char _NXRgbPath[1024];
#endif
diff --git a/nx-X11/programs/nxauth/Imakefile b/nx-X11/programs/nxauth/Imakefile
index 07b1ca752..278904f05 100644
--- a/nx-X11/programs/nxauth/Imakefile
+++ b/nx-X11/programs/nxauth/Imakefile
@@ -26,7 +26,7 @@ XCOMM $XFree86: xc/programs/xauth/Imakefile,v 3.5 2001/03/30 02:15:23 keithp Exp
INCLUDES=-I../../lib
DEPLIBS = $(DEPXAUTHLIB)
- LOCAL_LIBRARIES = ../../exports/lib/libXau.a
+ LOCAL_LIBRARIES = $(XAUTHLIB)
SRCS = xauth.c gethost.c process.c parsedpy.c
OBJS = xauth.o gethost.o process.o parsedpy.o
CONN_DEFINES = $(CONNECTION_FLAGS)
diff --git a/nx-X11/programs/nxauth/nxauth.man b/nx-X11/programs/nxauth/nxauth.man
index a414afad4..b9df3737d 100644
--- a/nx-X11/programs/nxauth/nxauth.man
+++ b/nx-X11/programs/nxauth/nxauth.man
@@ -27,51 +27,51 @@
.\"
.TH XAUTH 1 __xorgversion__
.SH NAME
-xauth \- X authority file utility
+nxauth \- NoMachine X authority file utility
.SH SYNOPSIS
-.B xauth
+.B nxauth
[ \fB\-f\fP \fIauthfile\fP ] [ \fB\-vqib\fP ] [ \fIcommand arg ...\fP ]
.SH DESCRIPTION
.PP
-The \fIxauth\fP program is used to edit and display the authorization
+The \fInxauth\fP program is used to edit and display the authorization
information used in connecting to the X server. This program is usually
used to extract authorization records from one machine and merge them in on
another (as is the case when using remote logins or granting access to
other users). Commands (described below) may be entered interactively,
-on the \fIxauth\fP command line, or in scripts. Note that this program
+on the \fInxauth\fP command line, or in scripts. Note that this program
does \fBnot\fP contact the X server except when the generate command is used.
-Normally \fIxauth\fP is not used to create the authority file entry in
+Normally \fInxauth\fP is not used to create the authority file entry in
the first place; \fIxdm\fP does that.
.SH OPTIONS
-The following options may be used with \fIxauth\fP. They may be given
+The following options may be used with \fInxauth\fP. They may be given
individually (e.g., \fI\-q \-i\|\fP) or may combined (e.g., \fI\-qi\|\fP).
.TP 8
.B "\-f \fIauthfile\fP"
This option specifies the name of the authority file to use. By default,
-\fIxauth\fP will use the file specified by the XAUTHORITY environment variable
+\fInxauth\fP will use the file specified by the nxauthORITY environment variable
or \fI\.Xauthority\fP in the user's home directory.
.TP 8
.B \-q
-This option indicates that \fIxauth\fP should operate quietly and not print
-unsolicited status messages. This is the default if an \fIxauth\fP command is
+This option indicates that \fInxauth\fP should operate quietly and not print
+unsolicited status messages. This is the default if an \fInxauth\fP command is
is given on the command line or if the standard output is not directed to a
terminal.
.TP 8
.B \-v
-This option indicates that \fIxauth\fP should operate verbosely and print
+This option indicates that \fInxauth\fP should operate verbosely and print
status messages indicating the results of various operations (e.g., how many
-records have been read in or written out). This is the default if \fIxauth\fP
+records have been read in or written out). This is the default if \fInxauth\fP
is reading commands from its standard input and its standard output is
directed to a terminal.
.TP 8
.B \-i
-This option indicates that \fIxauth\fP should ignore any authority file
-locks. Normally, \fIxauth\fP will refuse to read or edit any authority files
+This option indicates that \fInxauth\fP should ignore any authority file
+locks. Normally, \fInxauth\fP will refuse to read or edit any authority files
that have been locked by other programs (usually \fIxdm\fP or another
-\fIxauth\fP).
+\fInxauth\fP).
.TP 8
.B \-b
-This option indicates that \fIxauth\fP should attempt to break any authority
+This option indicates that \fInxauth\fP should attempt to break any authority
file locks before proceeding. Use this option only to clean up stale locks.
.SH COMMANDS
The following commands may be used to manipulate authority files:
@@ -157,14 +157,14 @@ Authorization entries matching the specified displays are removed from the
authority file.
.TP 8
.B "source \fIfilename"
-The specified file is treated as a script containing \fIxauth\fP commands
+The specified file is treated as a script containing \fInxauth\fP commands
to execute. Blank lines and lines beginning with a sharp sign (#) are
ignored. A single dash may be used to indicate the standard input, if it
hasn't already been read.
.TP 8
.B "info"
Information describing the authorization file, whether or not any changes
-have been made, and from where \fIxauth\fP commands are being read
+have been made, and from where \fInxauth\fP commands are being read
is printed on the standard output.
.TP 8
.B "exit"
@@ -194,12 +194,12 @@ referred to as \fIhostname\fP/unix:\fIdisplaynumber\fP so that
local entries for different machines may be stored in one authority file.
.SH EXAMPLE
.PP
-The most common use for \fIxauth\fP is to extract the entry for the
+The most common use for \fInxauth\fP is to extract the entry for the
current display, copy it to another machine, and merge it into the
user's authority file on the remote machine:
.sp
.nf
- % xauth extract \- $DISPLAY | rsh otherhost xauth merge \-
+ % nxauth extract \- $DISPLAY | rsh otherhost nxauth merge \-
.fi
.PP
.sp
@@ -207,10 +207,10 @@ The following command contacts the server :0 to create an
authorization using the MIT-MAGIC-COOKIE-1 protocol. Clients that
connect with this authorization will be untrusted.
.nf
- % xauth generate :0 .
+ % nxauth generate :0 .
.fi
.SH ENVIRONMENT
-This \fIxauth\fP program uses the following environment variables:
+This \fInxauth\fP program uses the following environment variables:
.TP 8
.B XAUTHORITY
to get the name of the authority file to use if the \fI\-f\fP option isn't
diff --git a/nx-X11/programs/xterm/config.guess b/nx-X11/programs/xterm/config.guess
index 6d71f752f..c2246a4f7 100644
--- a/nx-X11/programs/xterm/config.guess
+++ b/nx-X11/programs/xterm/config.guess
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
-timestamp='2005-05-27'
+timestamp='2009-12-30'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -26,16 +27,16 @@ timestamp='2005-05-27'
# the same distribution terms that you use for the rest of that program.
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -55,8 +56,9 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -106,7 +108,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -125,7 +127,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -160,6 +162,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@@ -168,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
+ | grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -199,50 +202,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
- amd64:OpenBSD:*:*)
- echo x86_64-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- cats:OpenBSD:*:*)
- echo arm-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- luna88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- macppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- mvmeppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- sgi:OpenBSD:*:*)
- echo mips64-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- sun3:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit ;;
*:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -354,14 +325,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@@ -562,7 +552,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[45])
+ *:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@@ -658,8 +648,7 @@ EOF
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
- # avoid double evaluation of $set_cc_for_build
- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ eval $set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -671,7 +660,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
+ grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
@@ -800,12 +789,19 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
- i*:MINGW*:*)
+ *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
@@ -815,12 +811,24 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -830,7 +838,7 @@ EOF
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
- amd64:CYGWIN*:*:*)
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
@@ -850,7 +858,31 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
@@ -862,6 +894,17 @@ EOF
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
@@ -871,63 +914,33 @@ EOF
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
+ mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
- #undef mips64
- #undef mips64el
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
+ CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
+ CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
@@ -937,8 +950,11 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
@@ -952,68 +968,15 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #ifdef __INTEL_COMPILER
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
- ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
@@ -1042,7 +1005,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@@ -1086,8 +1049,11 @@ EOF
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
@@ -1125,6 +1091,16 @@ EOF
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@@ -1137,7 +1113,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@@ -1200,6 +1176,9 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1209,6 +1188,15 @@ EOF
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@@ -1218,7 +1206,16 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
- *86) UNAME_PROCESSOR=i686 ;;
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1297,6 +1294,12 @@ EOF
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1457,9 +1460,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
diff --git a/nx-X11/programs/xterm/config.sub b/nx-X11/programs/xterm/config.sub
index 8b2c57a6e..c2d125724 100644
--- a/nx-X11/programs/xterm/config.sub
+++ b/nx-X11/programs/xterm/config.sub
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
-timestamp='2005-06-02'
+timestamp='2010-01-22'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -31,13 +32,16 @@ timestamp='2005-06-02'
# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@@ -71,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -119,8 +124,10 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -146,10 +153,13 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray)
+ -apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
+ -bluegene*)
+ os=-cnk
+ ;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@@ -171,6 +181,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +201,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -231,23 +249,28 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
+ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
- | mips64vr | mips64vrel \
+ | mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
@@ -256,35 +279,40 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
- | ms1 \
+ | moxie \
+ | mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
- | openrisc | or32 \
+ | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
+ | ubicom32 \
| v850 | v850e \
| we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
basic_machine=$basic_machine-unknown
;;
- m32c)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -304,28 +332,32 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
+ | avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
+ | mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
@@ -334,30 +366,35 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
- | ms1-* \
+ | mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile-* | tilegx-* \
| tron-* \
+ | ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
| ymp-* \
- | z8k-*)
+ | z8k-* | z80-*)
;;
- m32c-*)
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -421,6 +458,10 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -429,10 +470,26 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -461,8 +518,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16c)
- basic_machine=cr16c-unknown
+ cr16)
+ basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@@ -500,6 +557,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
@@ -654,6 +715,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
m88k-omron*)
basic_machine=m88k-omron
;;
@@ -665,10 +734,17 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -694,6 +770,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -769,9 +848,8 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
- or32 | or32-*)
+ openrisc | openrisc-*)
basic_machine=or32-unknown
- os=-coff
;;
os400)
basic_machine=powerpc-ibm
@@ -793,6 +871,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
pbd)
basic_machine=sparc-tti
;;
@@ -802,6 +888,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -858,6 +950,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -884,6 +980,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -895,6 +995,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
sh64)
basic_machine=sh64-unknown
;;
@@ -984,6 +1087,15 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
+ # This must be matched before tile*.
+ tilegx*)
+ basic_machine=tilegx-unknown
+ os=-linux-gnu
+ ;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -1059,6 +1171,10 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
none)
basic_machine=none-none
os=-none
@@ -1097,13 +1213,10 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1150,6 +1263,9 @@ case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@@ -1170,26 +1286,30 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
+ | -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* | -skyos*)
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1207,7 +1327,7 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
@@ -1319,6 +1439,11 @@ case $os in
-zvmoe)
os=-zvmoe
;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
-none)
;;
*)
@@ -1341,6 +1466,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
@@ -1350,9 +1481,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1378,6 +1509,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
+ mep-*)
+ os=-elf
+ ;;
mips*-cisco)
os=-elf
;;
@@ -1396,6 +1530,9 @@ case $basic_machine in
*-be)
os=-beos
;;
+ *-haiku)
+ os=-haiku
+ ;;
*-ibm)
os=-aix
;;
@@ -1504,7 +1641,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
- -aix*)
+ -cnk*|-aix*)
vendor=ibm
;;
-beos*)