#include "winternl.h"
#include "wine/unicode.h"
#include "wine/exception.h"
+#include "wine/svcctl.h"
#include "wine/debug.h"
#include "kernel_private.h"
return ret;
}
+/***********************************************************************
+ * show_longhostname_warn
+ */
+static void show_longhostname_warn(void)
+{
+ static const WCHAR longhostnameMutexW[] = {'_','_','w','i','n','e','_',
+ 'l','o','n','g','h','o','s','t','n','a','m','e',0};
+ static const WCHAR svcctl_started_event[] = SVCCTL_STARTED_EVENT;
+ HANDLE event = CreateEventW( NULL, TRUE, FALSE, svcctl_started_event );
+ DWORD ret;
+
+ if (!event)
+ return;
+ ret = WaitForSingleObject( event, 0 );
+ if (ret == WAIT_OBJECT_0)
+ {
+ HANDLE mutex = CreateMutexW( NULL, TRUE, longhostnameMutexW );
+ if (mutex)
+ {
+ if (GetLastError() != ERROR_ALREADY_EXISTS)
+ system( "eterx11msg -longhostname" );
+ else
+ CloseHandle( mutex );
+ }
+ }
+ CloseHandle(event);
+}
+
/***********************************************************************
* COMPUTERNAME_Init (INTERNAL)
strcat(hbuf,"-");
strcat(hbuf, user);
}
+ else
+ show_longhostname_warn();
}
}