Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-03-02 20:07:39 +0300
committerCorinna Vinschen <corinna@vinschen.de>2018-03-02 20:17:13 +0300
commit1949db782917f6703da736f9f15665ca7e5d6e0d (patch)
treec8ba7d52894037d7067264b41648b9add3cef18c /winsup
parentd87ef0dac99a453497d5b53d18cd4661500b963a (diff)
Cygwin: drop CYGWIN_SOCKET_UUID, define CYGWIN_SOCKET_GUID as GUID pointer
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/fhandler_socket_unix.cc8
-rw-r--r--winsup/cygwin/ntdll.h5
-rw-r--r--winsup/cygwin/path.cc5
3 files changed, 12 insertions, 6 deletions
diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc
index 506befc51..ee43b1f7b 100644
--- a/winsup/cygwin/fhandler_socket_unix.cc
+++ b/winsup/cygwin/fhandler_socket_unix.cc
@@ -34,6 +34,14 @@ static int __unused
get_inet_addr_unix (const struct sockaddr *in, int inlen,
struct sockaddr_storage *out, int *outlen,
int *type = NULL)
+GUID __cygwin_socket_guid = {
+ .Data1 = 0xefc1714d,
+ .Data2 = 0x7b19,
+ .Data3 = 0x4407,
+ .Data4 = { 0xba, 0xb3, 0xc5, 0xb1, 0xf9, 0x2c, 0xb8, 0x8c }
+};
+
+HANDLE
{
/* Check for abstract socket. */
if (inlen >= (int) sizeof (in->sa_family) + 7
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index 68c359e32..c89591f44 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -10,9 +10,10 @@
#include <w32api/ntstatus.h>
-/* Special values for Cygwin AF_UNIX socket reparse points. */
+/* Values for Cygwin AF_UNIX socket reparse points. */
#define IO_REPARSE_TAG_CYGUNIX (0x00006375)
-#define CYGWIN_SOCKET_UUID L"efc1714d-7b19-4407-bab3-c5b1f92cb88c"
+extern GUID __cygwin_socket_guid;
+#define CYGWIN_SOCKET_GUID (&__cygwin_socket_guid)
/* custom status code: */
#define STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION ((NTSTATUS) 0xe0000269)
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index f608257f3..a132a0a7e 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -65,7 +65,6 @@
#include "shared_info.h"
#include "tls_pbuf.h"
#include "environ.h"
-#include "uuid.h"
#undef basename
suffix_info stat_suffixes[] =
@@ -2356,10 +2355,8 @@ check_reparse_point_target (HANDLE h, bool remote, PREPARSE_DATA_BUFFER rp,
else if (rp->ReparseTag == IO_REPARSE_TAG_CYGUNIX)
{
PREPARSE_GUID_DATA_BUFFER rgp = (PREPARSE_GUID_DATA_BUFFER) rp;
- UUID uuid;
- uuid_from_string (CYGWIN_SOCKET_UUID, uuid);
- if (memcmp (&uuid, &rgp->ReparseGuid, sizeof (UUID)) == 0)
+ if (memcmp (CYGWIN_SOCKET_GUID, &rgp->ReparseGuid, sizeof (GUID)) == 0)
return PATH_SOCKET | PATH_REP;
}
return 0;