Merge latest changes from CYGWIN branch
Use find | xargs combination instead of simple shell globbing to prevent commandline argument overflow
This commit is contained in:
parent
a12a678bc9
commit
8ef3e7052e
|
@ -1,3 +1,26 @@
|
||||||
|
2004-07-09 Alexander Gottwald <ago@freedesktop.org>
|
||||||
|
|
||||||
|
* winconfig.c: Add entry for irish layout (ie)
|
||||||
|
* InitOutput.c, winerror.c, winglobals.c: rename g_fUseMsg to
|
||||||
|
g_fSilentFatalError
|
||||||
|
* InitOutput.c, winglobals.c, winprocarg.c: added commandline option
|
||||||
|
-silent-dup-error to allow silent termination if another instance of
|
||||||
|
XWin was found running
|
||||||
|
|
||||||
|
2004-06-27 Alexander Gottwald <ago@freedesktop.org>
|
||||||
|
|
||||||
|
* winconfig.c: Add entry for us layout. This changes not much but
|
||||||
|
removes a strange error message about the unknown us layout.
|
||||||
|
|
||||||
|
2004-06-24 Alexander Gottwald <ago@freedesktop.org>
|
||||||
|
|
||||||
|
* InitOutput.c: Check for textmode mounted /tmp and print a warning
|
||||||
|
|
||||||
|
2004-06-15 Harold Hunt <huntharo@msu.edu>
|
||||||
|
|
||||||
|
* windialogs.c: Fix path to locally installed changelog for the About
|
||||||
|
dialog box.
|
||||||
|
|
||||||
2004-05-27 Alexander Gottwald <ago@freedesktop.org>
|
2004-05-27 Alexander Gottwald <ago@freedesktop.org>
|
||||||
|
|
||||||
* winpriv.c: Create win32 window if not already created
|
* winpriv.c: Create win32 window if not already created
|
||||||
|
@ -62,3 +85,5 @@
|
||||||
logging api's. Add some additional debug logging. Make best effort
|
logging api's. Add some additional debug logging. Make best effort
|
||||||
to prevent our window appearing twice in the clipboard chain. Also
|
to prevent our window appearing twice in the clipboard chain. Also
|
||||||
detect loops when they occur and try to behave in a reasonable way.
|
detect loops when they occur and try to behave in a reasonable way.
|
||||||
|
|
||||||
|
# vim:ts=8:noexpandtab
|
||||||
|
|
|
@ -35,6 +35,7 @@ from The Open Group.
|
||||||
#endif
|
#endif
|
||||||
#include "winprefs.h"
|
#include "winprefs.h"
|
||||||
#include "X11/Xlocale.h"
|
#include "X11/Xlocale.h"
|
||||||
|
#include <mntent.h>
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -45,7 +46,7 @@ extern int g_iNumScreens;
|
||||||
extern winScreenInfo g_ScreenInfo[];
|
extern winScreenInfo g_ScreenInfo[];
|
||||||
extern int g_iLastScreen;
|
extern int g_iLastScreen;
|
||||||
extern char * g_pszCommandLine;
|
extern char * g_pszCommandLine;
|
||||||
extern Bool g_fUseMsg;
|
extern Bool g_fSilentFatalError;
|
||||||
|
|
||||||
extern char * g_pszLogFile;
|
extern char * g_pszLogFile;
|
||||||
extern int g_iLogVerbose;
|
extern int g_iLogVerbose;
|
||||||
|
@ -72,6 +73,7 @@ extern FARPROC g_fpDirectDrawCreateClipper;
|
||||||
extern HMODULE g_hmodCommonControls;
|
extern HMODULE g_hmodCommonControls;
|
||||||
extern FARPROC g_fpTrackMouseEvent;
|
extern FARPROC g_fpTrackMouseEvent;
|
||||||
extern Bool g_fNoHelpMessageBox;
|
extern Bool g_fNoHelpMessageBox;
|
||||||
|
extern Bool g_fSilentDupError;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -267,6 +269,89 @@ AbortDDX (void)
|
||||||
ddxGiveUp ();
|
ddxGiveUp ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* hasmntopt is currently not implemented for cygwin */
|
||||||
|
const char *winCheckMntOpt(const struct mntent *mnt, const char *opt)
|
||||||
|
{
|
||||||
|
const char *s;
|
||||||
|
size_t len;
|
||||||
|
if (mnt == NULL)
|
||||||
|
return NULL;
|
||||||
|
if (opt == NULL)
|
||||||
|
return NULL;
|
||||||
|
if (mnt->mnt_opts == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
len = strlen(opt);
|
||||||
|
s = strstr(mnt->mnt_opts, opt);
|
||||||
|
if (s == NULL)
|
||||||
|
return NULL;
|
||||||
|
if ((s == mnt->mnt_opts || *(s-1) == ',') && (s[len] == 0 || s[len] == ','))
|
||||||
|
return (char *)opt;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
winCheckMount(void)
|
||||||
|
{
|
||||||
|
FILE *mnt;
|
||||||
|
struct mntent *ent;
|
||||||
|
|
||||||
|
enum { none = 0, sys_root, user_root, sys_tmp, user_tmp }
|
||||||
|
level = none, curlevel;
|
||||||
|
BOOL binary = TRUE;
|
||||||
|
|
||||||
|
mnt = setmntent("/etc/mtab", "r");
|
||||||
|
if (mnt == NULL)
|
||||||
|
{
|
||||||
|
ErrorF("setmntent failed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
while ((ent = getmntent(mnt)) != NULL)
|
||||||
|
{
|
||||||
|
BOOL system = (strcmp(ent->mnt_type, "system") == 0);
|
||||||
|
BOOL root = (strcmp(ent->mnt_dir, "/") == 0);
|
||||||
|
BOOL tmp = (strcmp(ent->mnt_dir, "/tmp") == 0);
|
||||||
|
|
||||||
|
if (system)
|
||||||
|
{
|
||||||
|
if (root)
|
||||||
|
curlevel = sys_root;
|
||||||
|
else if (tmp)
|
||||||
|
curlevel = sys_tmp;
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (root)
|
||||||
|
curlevel = user_root;
|
||||||
|
else if (tmp)
|
||||||
|
curlevel = user_tmp;
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (curlevel <= level)
|
||||||
|
continue;
|
||||||
|
level = curlevel;
|
||||||
|
|
||||||
|
if (winCheckMntOpt(ent, "binmode") == NULL)
|
||||||
|
binary = 0;
|
||||||
|
else
|
||||||
|
binary = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (endmntent(mnt) != 1)
|
||||||
|
{
|
||||||
|
ErrorF("endmntent failed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!binary)
|
||||||
|
winMsg(X_WARNING, "/tmp mounted int textmode\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
OsVendorInit (void)
|
OsVendorInit (void)
|
||||||
|
@ -296,6 +381,8 @@ OsVendorInit (void)
|
||||||
if (serverGeneration == 1)
|
if (serverGeneration == 1)
|
||||||
winLogVersionInfo ();
|
winLogVersionInfo ();
|
||||||
|
|
||||||
|
winCheckMount();
|
||||||
|
|
||||||
/* Add a default screen if no screens were specified */
|
/* Add a default screen if no screens were specified */
|
||||||
if (g_iNumScreens == 0)
|
if (g_iNumScreens == 0)
|
||||||
{
|
{
|
||||||
|
@ -472,7 +559,7 @@ void
|
||||||
ddxUseMsg(void)
|
ddxUseMsg(void)
|
||||||
{
|
{
|
||||||
/* Set a flag so that FatalError won't give duplicate warning message */
|
/* Set a flag so that FatalError won't give duplicate warning message */
|
||||||
g_fUseMsg = TRUE;
|
g_fSilentFatalError = TRUE;
|
||||||
|
|
||||||
winUseMsg();
|
winUseMsg();
|
||||||
|
|
||||||
|
@ -534,6 +621,8 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
|
||||||
/* Check for duplicate invocation on same display number.*/
|
/* Check for duplicate invocation on same display number.*/
|
||||||
if (serverGeneration == 1 && !winCheckDisplayNumber ())
|
if (serverGeneration == 1 && !winCheckDisplayNumber ())
|
||||||
{
|
{
|
||||||
|
if (g_fSilentDupError)
|
||||||
|
g_fSilentFatalError = TRUE;
|
||||||
FatalError ("InitOutput - Duplicate invocation on display "
|
FatalError ("InitOutput - Duplicate invocation on display "
|
||||||
"number: %s. Exiting.\n", display);
|
"number: %s. Exiting.\n", display);
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,9 +238,11 @@ WinKBLayoutRec winKBLayouts[] = {
|
||||||
{ 0x407, -1, "pc105", "de", NULL, NULL, "German (Germany)"},
|
{ 0x407, -1, "pc105", "de", NULL, NULL, "German (Germany)"},
|
||||||
{0x10407, -1, "pc105", "de", NULL, NULL, "German (Germany, IBM)"},
|
{0x10407, -1, "pc105", "de", NULL, NULL, "German (Germany, IBM)"},
|
||||||
{ 0x807, -1, "pc105", "de_CH", NULL, NULL, "German (Switzerland)"},
|
{ 0x807, -1, "pc105", "de_CH", NULL, NULL, "German (Switzerland)"},
|
||||||
|
{ 0x409, -1, "pc105", "us", NULL, NULL, "English (USA)"},
|
||||||
{0x10409, -1, "pc105", "dvorak", NULL, NULL, "English (USA, Dvorak)"},
|
{0x10409, -1, "pc105", "dvorak", NULL, NULL, "English (USA, Dvorak)"},
|
||||||
{0x20409, -1, "pc105", "us_intl", NULL, NULL, "English (USA, International)"},
|
{0x20409, -1, "pc105", "us_intl", NULL, NULL, "English (USA, International)"},
|
||||||
{ 0x809, -1, "pc105", "gb", NULL, NULL, "English (United Kingdom)"},
|
{ 0x809, -1, "pc105", "gb", NULL, NULL, "English (United Kingdom)"},
|
||||||
|
{ 0x1809, -1, "pc105", "ie", NULL, NULL, "Irish"},
|
||||||
{ 0x40a, -1, "pc105", "es", NULL, NULL, "Spanish (Spain, Traditional Sort)"},
|
{ 0x40a, -1, "pc105", "es", NULL, NULL, "Spanish (Spain, Traditional Sort)"},
|
||||||
{ 0x40b, -1, "pc105", "fi", NULL, NULL, "Finnish"},
|
{ 0x40b, -1, "pc105", "fi", NULL, NULL, "Finnish"},
|
||||||
{ 0x40c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"},
|
{ 0x40c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"},
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
/* References to external symbols */
|
/* References to external symbols */
|
||||||
extern char * g_pszCommandLine;
|
extern char * g_pszCommandLine;
|
||||||
extern Bool g_fUseMsg;
|
extern Bool g_fSilentFatalError;
|
||||||
|
|
||||||
|
|
||||||
#ifdef DDXOSVERRORF
|
#ifdef DDXOSVERRORF
|
||||||
|
@ -69,7 +69,7 @@ void
|
||||||
OsVendorFatalError (void)
|
OsVendorFatalError (void)
|
||||||
{
|
{
|
||||||
/* Don't give duplicate warning if UseMsg was called */
|
/* Don't give duplicate warning if UseMsg was called */
|
||||||
if (g_fUseMsg)
|
if (g_fSilentFatalError)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
winMessageBoxF ("A fatal error has occurred and Cygwin/X will now exit.\n" \
|
winMessageBoxF ("A fatal error has occurred and Cygwin/X will now exit.\n" \
|
||||||
|
|
|
@ -59,13 +59,14 @@ char * g_pszLogFile = "/tmp/XWin.log";
|
||||||
int g_iLogVerbose = 2;
|
int g_iLogVerbose = 2;
|
||||||
Bool g_fLogInited = FALSE;
|
Bool g_fLogInited = FALSE;
|
||||||
char * g_pszCommandLine = NULL;
|
char * g_pszCommandLine = NULL;
|
||||||
Bool g_fUseMsg = FALSE;
|
Bool g_fSilentFatalError = FALSE;
|
||||||
DWORD g_dwCurrentThreadID = 0;
|
DWORD g_dwCurrentThreadID = 0;
|
||||||
Bool g_fKeyboardHookLL = FALSE;
|
Bool g_fKeyboardHookLL = FALSE;
|
||||||
HHOOK g_hhookKeyboardLL = NULL;
|
HHOOK g_hhookKeyboardLL = NULL;
|
||||||
HWND g_hwndKeyboardFocus = NULL;
|
HWND g_hwndKeyboardFocus = NULL;
|
||||||
Bool g_fNoHelpMessageBox = FALSE;
|
Bool g_fNoHelpMessageBox = FALSE;
|
||||||
Bool g_fSoftwareCursor = FALSE;
|
Bool g_fSoftwareCursor = FALSE;
|
||||||
|
Bool g_fSilentDupError = FALSE;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -50,6 +50,7 @@ extern char * g_pszCommandLine;
|
||||||
extern Bool g_fKeyboardHookLL;
|
extern Bool g_fKeyboardHookLL;
|
||||||
extern Bool g_fNoHelpMessageBox;
|
extern Bool g_fNoHelpMessageBox;
|
||||||
extern Bool g_fSoftwareCursor;
|
extern Bool g_fSoftwareCursor;
|
||||||
|
extern Bool g_fSilentDupError;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1154,6 +1155,11 @@ ddxProcessArgument (int argc, char *argv[], int i)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IS_OPTION ("-silent-dup-error"))
|
||||||
|
{
|
||||||
|
g_fSilentDupError = TRUE;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue