public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-modules] Fixes for darwin
@ 2020-06-10 13:17 Nathan Sidwell
  0 siblings, 0 replies; only message in thread
From: Nathan Sidwell @ 2020-06-10 13:17 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2d79fc0f6e4230a2472631a74eb470a26ba1d94d

commit 2d79fc0f6e4230a2472631a74eb470a26ba1d94d
Author: Nathan Sidwell <nathan@acm.org>
Date:   Wed Jun 10 06:16:45 2020 -0700

    Fixes for darwin
    
            gcc/cp/
            * mapper-server.cc: Reorder includes.
            (server): Block scope potentially empty if clause.
            * module.cc (get_mapper): Don't use C++14.
            gcc/testsuite/
            * g++.dg/modules/bad-mapper-3: Adjust error.

Diff:
---
 ChangeLog.modules                           | 10 ++++++++++
 gcc/cp/mapper-server.cc                     | 17 +++++++++++------
 gcc/cp/module.cc                            |  2 +-
 gcc/testsuite/g++.dg/modules/bad-mapper-3.C |  2 +-
 4 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/ChangeLog.modules b/ChangeLog.modules
index 660c54bfff4..9097fdbcb84 100644
--- a/ChangeLog.modules
+++ b/ChangeLog.modules
@@ -1,3 +1,13 @@
+2020-06-10  Iain Sandoe  <iain@sandoe.co.uk>
+
+	Fixes for darwin
+	gcc/cp/
+	* mapper-server.cc: Reorder includes.
+	(server): Block scope potentially empty if clause.
+	* module.cc (get_mapper): Don't use C++14.
+	gcc/testsuite/
+	* g++.dg/modules/bad-mapper-3: Adjust error.
+
 2020-06-05  Nathan Sidwell  <nathan@acm.org>
 
 	Install V1 module protocol goop
diff --git a/gcc/cp/mapper-server.cc b/gcc/cp/mapper-server.cc
index 9babe58b1ea..ee3f3f798b9 100644
--- a/gcc/cp/mapper-server.cc
+++ b/gcc/cp/mapper-server.cc
@@ -28,10 +28,6 @@ along with GCC; see the file COPYING3.  If not see
 #define INCLUDE_VECTOR
 #define INCLUDE_MAP
 #define INCLUDE_SET
-#include "system.h"
-#include "version.h"
-#include "intl.h"
-#include <getopt.h>
 
 // Network
 /* Include network stuff first.  Excitingly OSX10.14 uses bcmp here, which
@@ -58,6 +54,13 @@ along with GCC; see the file COPYING3.  If not see
 # define gai_strerror(X) ""
 #endif
 
+// Excitingly Darwin uses bcmp in its network headers, and we poison
+// that in our setup.
+#include "system.h"
+#include "version.h"
+#include "intl.h"
+#include <getopt.h>
+
 // Select or epoll
 #ifdef NETWORKING
 #ifdef HAVE_EPOLL
@@ -399,7 +402,7 @@ do_epoll_ctl (int epoll_fd, int code, int event, int fd, unsigned data)
 #define my_epoll_ctl(EFD,C,EV,FD,CL) \
   ((EFD) >= 0 ? do_epoll_ctl (EFD,C,EV,FD,CL) : (void)0)
 #else
-#define  my_epoll_ctl(EFD,C,EV,FD,CL) ((void)(EFD), (void)(FD), (void)CL)
+#define my_epoll_ctl(EFD,C,EV,FD,CL) ((void)(EFD), (void)(FD), (void)(CL))
 #endif
 
 #ifdef NETWORKING
@@ -562,9 +565,11 @@ server (bool ipv6, int sock_fd, module_resolver *resolver)
       int event_count;
 
       if (epoll_fd >= 0)
+	{
 #ifdef HAVE_EPOLL
-	event_count = epoll_pwait (epoll_fd, events, max_events, -1, &mask);
+	  event_count = epoll_pwait (epoll_fd, events, max_events, -1, &mask);
 #endif
+	}
       else
 	{
 #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index bbb33bd30ce..4d6654286b7 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -3865,7 +3865,7 @@ static GTY(()) vec<tree, va_gc> *class_members;
 module_client *mapper;
 
 static module_client *make_mapper (location_t loc);
-inline auto *get_mapper (location_t loc)
+inline module_client *get_mapper (location_t loc)
 {
   auto *res = mapper;
   if (!res)
diff --git a/gcc/testsuite/g++.dg/modules/bad-mapper-3.C b/gcc/testsuite/g++.dg/modules/bad-mapper-3.C
index 37c5d921c20..9dab332ccb2 100644
--- a/gcc/testsuite/g++.dg/modules/bad-mapper-3.C
+++ b/gcc/testsuite/g++.dg/modules/bad-mapper-3.C
@@ -1,6 +1,6 @@
 //  { dg-additional-options "-fmodules-ts -fmodule-mapper=localhost:172477262" }
 import unique3.bob;
-// { dg-error "failed connecting socket .* 'localhost:" "" { target *-*-* } 0 }
+// { dg-error {failed connecting mapper 'localhost:172477262'} "" { target *-*-* } 0 }
 // { dg-prune-output "fatal error:" }
 // { dg-prune-output "failed to read" }
 // { dg-prune-output "compilation terminated" }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-10 13:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 13:17 [gcc/devel/c++-modules] Fixes for darwin Nathan Sidwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).