From fe978cb071b460b2d4aed2f9a71d895f84efce0e Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 27 Feb 2015 16:33:07 +0000 Subject: C++ keyword cleanliness, mostly auto-generated This patch renames symbols that happen to have names which are reserved keywords in C++. Most of this was generated with Tromey's cxx-conversion.el script. Some places where later hand massaged a bit, to fix formatting, etc. And this was rebased several times meanwhile, along with re-running the script, so re-running the script from scratch probably does not result in the exact same output. I don't think that matters anyway. gdb/ 2015-02-27 Tom Tromey Pedro Alves Rename symbols whose names are reserved C++ keywords throughout. gdb/gdbserver/ 2015-02-27 Tom Tromey Pedro Alves Rename symbols whose names are reserved C++ keywords throughout. --- gdb/common/cleanups.c | 12 ++++++------ gdb/common/filestuff.c | 9 +++++---- gdb/common/filestuff.h | 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) (limited to 'gdb/common') diff --git a/gdb/common/cleanups.c b/gdb/common/cleanups.c index 964df7a..e57e4cc 100644 --- a/gdb/common/cleanups.c +++ b/gdb/common/cleanups.c @@ -79,15 +79,15 @@ static struct cleanup * make_my_cleanup2 (struct cleanup **pmy_chain, make_cleanup_ftype *function, void *arg, void (*free_arg) (void *)) { - struct cleanup *new + struct cleanup *newobj = (struct cleanup *) xmalloc (sizeof (struct cleanup)); struct cleanup *old_chain = *pmy_chain; - new->next = *pmy_chain; - new->function = function; - new->free_arg = free_arg; - new->arg = arg; - *pmy_chain = new; + newobj->next = *pmy_chain; + newobj->function = function; + newobj->free_arg = free_arg; + newobj->arg = arg; + *pmy_chain = newobj; gdb_assert (old_chain != NULL); return old_chain; diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c index ef12821..14d6324 100644 --- a/gdb/common/filestuff.c +++ b/gdb/common/filestuff.c @@ -343,10 +343,11 @@ gdb_fopen_cloexec (const char *filename, const char *opentype) /* See filestuff.h. */ int -gdb_socketpair_cloexec (int namespace, int style, int protocol, int filedes[2]) +gdb_socketpair_cloexec (int domain, int style, int protocol, + int filedes[2]) { #ifdef HAVE_SOCKETPAIR - int result = socketpair (namespace, style | SOCK_CLOEXEC, protocol, filedes); + int result = socketpair (domain, style | SOCK_CLOEXEC, protocol, filedes); if (result != -1) { @@ -363,9 +364,9 @@ gdb_socketpair_cloexec (int namespace, int style, int protocol, int filedes[2]) /* See filestuff.h. */ int -gdb_socket_cloexec (int namespace, int style, int protocol) +gdb_socket_cloexec (int domain, int style, int protocol) { - int result = socket (namespace, style | SOCK_CLOEXEC, protocol); + int result = socket (domain, style | SOCK_CLOEXEC, protocol); if (result != -1) socket_mark_cloexec (result); diff --git a/gdb/common/filestuff.h b/gdb/common/filestuff.h index f44f3b1..98522a6 100644 --- a/gdb/common/filestuff.h +++ b/gdb/common/filestuff.h @@ -54,13 +54,13 @@ extern FILE *gdb_fopen_cloexec (const char *filename, const char *opentype); /* Like 'socketpair', but ensures that the returned file descriptors have the close-on-exec flag set. */ -extern int gdb_socketpair_cloexec (int namespace, int style, int protocol, +extern int gdb_socketpair_cloexec (int domain, int style, int protocol, int filedes[2]); /* Like 'socket', but ensures that the returned file descriptor has the close-on-exec flag set. */ -extern int gdb_socket_cloexec (int namespace, int style, int protocol); +extern int gdb_socket_cloexec (int domain, int style, int protocol); /* Like 'pipe', but ensures that the returned file descriptors have the close-on-exec flag set. */ -- cgit v1.1