Commit Graph

8 Commits

Author SHA1 Message Date
Iain Sandoe
41f01c9715 c++tools: Work around a BSD bug in getaddrinfo().
Some versions of the BSD getaddrinfo() call do not work with the specific
input of "0" for the servname entry (a segv results).  Since we are making
the call with a dummy port number, the value is actually no important, other
than it should be in range.  Work around the BSD bug by using "1" instead.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

c++tools/ChangeLog:

	* server.cc (accept_from): Use "1" as the dummy port number.
2022-03-18 15:23:49 +00:00
Jakub Jelinek
7adcbafe45 Update copyright years. 2022-01-03 10:42:10 +01:00
Iain Sandoe
e4d306cf70 c++tools, configury: Configure with C++; test checking status [PR98821].
The c++tools configure fragments need to be built with a C++ compiler.

In addition, the stand-alone server uses diagnostic mechanisms in common
with GCC, but needs to define implementations for gcc_assert and
supporting output functions.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

PR c++/98821 - modules : c++tools configures with CC but code fragments assume CXX.

	PR c++/98821

c++tools/ChangeLog:

	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Configure using C++.  Pull logic to
	detect enabled checking modes; default to release
	checking.
	* server.cc (AI_NUMERICSERV): Define a fallback value.
	(gcc_assert): New.
	(gcc_unreachable): New.
	(fancy_abort): Only build when checking is enabled.

Co-authored-by: Jakub Jelinek <jakub@redhat.com>
2021-07-21 13:40:17 +01:00
Jakub Jelinek
7a5e9a58fb c++tools: Include <cstdlib> for exit [PR100731]
This TU uses exit, but doesn't include <stdlib.h> or <cstdlib> and relies
on some other header to include it indirectly, which apparently doesn't
happen on reporter's host.

The other <c*> headers aren't guarded either and we rely on a compiler
capable of C++11, so maybe we can rely on <cstdlib> being around
unconditionally.

2021-05-25  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/100731
	* server.cc: Include <cstdlib>.
2021-05-25 16:44:35 +02:00
Jakub Jelinek
c9a089cad1 Update copyright years in c++tools
While looking at PR100731, I have noticed the copyright years are 2020-ish
only.  This patch adds it to update-copyright.py and updates those.

2021-05-25  Jakub Jelinek  <jakub@redhat.com>

contrib/
	* update-copyright.py: Add c++tools.
c++tools/
	* Makefile.in: Update copyright year.
	* configure.ac: Likewise.
	* resolver.cc: Likewise.
	* resolver.h: Likewise.
	* server.cc: Likewise.
	(print_version): Update copyright notice date.
2021-05-25 11:12:03 +02:00
Nathan Sidwell
9f08c08531 c++tools: Make NETWORKING define check consistent [PR 98318]
PR98318 also pointed out that the NETWORKING #define was being checked
with both #if and #ifdef.  Let's consistently use one form.

	c++tools/
	* server.cc: Use #if NETWORKING not #ifdef, to be consistent
	with elsewhere.
2021-02-25 08:58:26 -08:00
Nathan Sidwell
b429f53eba bootstrap: Don't use strsignal [PR 98300]
Sadly strsignal is nonportable, so signal numbers it is then.

	c++tools/
	* server.cc (crash_signal): Don't use strsignal.
2020-12-17 06:07:18 -08:00
Nathan Sidwell
35fc243fca Add c++tools
Part of our module implementation adds a sample mapper server, the
guts of which are used by the default in-process mapping of cc1plus.
Rather than add another executable to gcc/cp/, this creates a new
c++tools directory where this and any other c++ tools might live.
The toplevel changes are a subsequent commit, because ... git.

c++tools/ChangeLog:

	* Makefile.in: New.
	* config.h.in: New.
	* configure: New.
	* configure.ac: New.
	* resolver.cc: New.
	* resolver.h: New.
	* server.cc: New.
2020-12-15 07:41:54 -08:00