[glib: 3/12] gio: compile GUnixSocketAddress on all platforms




commit 3308cfb020f823a0863ce9f90f125ba9bfcdbf13
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Wed Jan 19 00:00:39 2022 +0400

    gio: compile GUnixSocketAddress on all platforms
    
    Move the header under the common GIO include directory.
    
    Sorry if it breaks any build, you had to use the correct header path.
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 docs/reference/gio/meson.build |  1 -
 gio/gunixsocketaddress.c       | 13 ++++++++++---
 gio/meson.build                |  4 ++--
 3 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build
index f63d1ac04..34a361bdf 100644
--- a/docs/reference/gio/meson.build
+++ b/docs/reference/gio/meson.build
@@ -115,7 +115,6 @@ if get_option('gtk_doc')
       'gunixfdmessage.h',
       'gunixinputstream.h',
       'gunixoutputstream.h',
-      'gunixsocketaddress.h',
       'gdesktopappinfo.h',
       'gosxappinfo.h',
     ]
diff --git a/gio/gunixsocketaddress.c b/gio/gunixsocketaddress.c
index 69204e9b9..f80e8cc88 100644
--- a/gio/gunixsocketaddress.c
+++ b/gio/gunixsocketaddress.c
@@ -28,6 +28,9 @@
 #include "glibintl.h"
 #include "gnetworking.h"
 
+#ifdef G_OS_WIN32
+#include "giowin32-afunix.h"
+#endif
 
 /**
  * SECTION:gunixsocketaddress
@@ -45,9 +48,13 @@
  * errors. You can use g_unix_socket_address_abstract_names_supported()
  * to see if abstract names are supported.
  *
- * Note that `<gio/gunixsocketaddress.h>` belongs to the UNIX-specific GIO
- * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file
- * when using it.
+ * Since GLib 2.72, #GUnixSocketAddress is available on all platforms. It
+ * requires underlying system support (such as Windows 10 with `AF_UNIX`) at
+ * run time.
+ *
+ * Before GLib 2.72, `<gio/gunixsocketaddress.h>` belonged to the UNIX-specific
+ * GIO interfaces, thus you had to use the `gio-unix-2.0.pc` pkg-config file
+ * when using it. This is no longer necessary since GLib 2.72.
  */
 
 /**
diff --git a/gio/meson.build b/gio/meson.build
index 43c9c41cc..1ba9ce356 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -352,7 +352,6 @@ if host_system != 'windows'
     'gunixfdmessage.c',
     'gunixmount.c',
     'gunixmounts.c',
-    'gunixsocketaddress.c',
     'gunixvolume.c',
     'gunixvolumemonitor.c',
     'gunixinputstream.c',
@@ -383,7 +382,6 @@ if host_system != 'windows'
     'gunixfdmessage.h',
     'gunixinputstream.h',
     'gunixoutputstream.h',
-    'gunixsocketaddress.h',
   )
 
   if glib_have_cocoa
@@ -569,6 +567,7 @@ gio_sources = files(
   'gdtlsclientconnection.c',
   'gdtlsserverconnection.c',
   'gunionvolumemonitor.c',
+  'gunixsocketaddress.c',
   'gvfs.c',
   'gvolume.c',
   'gvolumemonitor.c',
@@ -704,6 +703,7 @@ gio_headers = files(
   'gdtlsconnection.h',
   'gdtlsclientconnection.h',
   'gdtlsserverconnection.h',
+  'gunixsocketaddress.h',
   'gvfs.h',
   'gvolume.h',
   'gvolumemonitor.h',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]