summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-04-03 08:31:07 +0000
committerUlrich Drepper <drepper@redhat.com>2002-04-03 08:31:07 +0000
commitc64bd6c2f4b681cbc88ce33afb01d8609cef27c0 (patch)
tree4d8a8b7d6f688376fc91b301bf7c01f2b408bf13
parentb028b8ad4ebb0a8303c380176cf465b0a8bbce45 (diff)
downloadglibc-c64bd6c2f4b681cbc88ce33afb01d8609cef27c0.tar.gz
Update.
2002-04-03 Ulrich Drepper <drepper@redhat.com> * sunrpc/rpc_svcout.c (printif): Remove third parameter. It was always "&". Adjust callers. Add "_" prefix to several generated definitions. Patch by paul@serice.net [PR libc/3158].
-rw-r--r--ChangeLog7
-rw-r--r--sunrpc/rpc_svcout.c30
2 files changed, 17 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index b6ca5ebc62..30801b9628 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-04-03 Ulrich Drepper <drepper@redhat.com>
+
+ * sunrpc/rpc_svcout.c (printif): Remove third parameter. It was
+ always "&". Adjust callers.
+ Add "_" prefix to several generated definitions.
+ Patch by paul@serice.net [PR libc/3158].
+
2002-04-02 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/arm/dl-procinfo.c: Completely specify
diff --git a/sunrpc/rpc_svcout.c b/sunrpc/rpc_svcout.c
index 4cd7c6cad0..be5829d4d2 100644
--- a/sunrpc/rpc_svcout.c
+++ b/sunrpc/rpc_svcout.c
@@ -57,8 +57,7 @@ static void p_xdrfunc (const char *rname, const char *typename);
static void write_real_program (const definition * def);
static void write_program (const definition * def, const char *storage);
static void printerr (const char *err, const char *transp);
-static void printif (const char *proc, const char *transp,
- const char *prefix, const char *arg);
+static void printif (const char *proc, const char *transp, const char *arg);
static void write_inetmost (const char *infile);
static void print_return (const char *space);
static void print_pmapunset (const char *space);
@@ -514,7 +513,7 @@ write_program (const definition * def, const char *storage)
}
else
{
- f_print (fout, "\tbool_t (*xdr_%s)(), (*xdr_%s)();\n", ARG, RESULT);
+ f_print (fout, "\tbool_t (*_xdr_%s)(), (*_xdr_%s)();\n", ARG, RESULT);
if (mtflag)
f_print(fout, "\tbool_t (*%s)();\n", ROUTINE);
else
@@ -540,9 +539,7 @@ write_program (const definition * def, const char *storage)
{
f_print (fout, "\tcase NULLPROC:\n");
f_print (fout,
- Cflag
- ? "\t\t(void) svc_sendreply (%s, (xdrproc_t) xdr_void, (char *)NULL);\n"
- : "\t\t(void) svc_sendreply (%s, xdr_void, (char *)NULL);\n",
+ "\t\t(void) svc_sendreply (%s, (xdrproc_t) xdr_void, (char *)NULL);\n",
TRANSP);
print_return ("\t\t");
f_print (fout, "\n");
@@ -593,10 +590,7 @@ write_program (const definition * def, const char *storage)
f_print (fout, "\t}\n");
f_print (fout, "\tmemset ((char *)&%s, 0, sizeof (%s));\n", ARG, ARG);
- if (Cflag)
- printif ("getargs", TRANSP, "(caddr_t) &", ARG);
- else
- printif ("getargs", TRANSP, "&", ARG);
+ printif ("getargs", TRANSP, ARG);
printerr ("decode", TRANSP);
print_return ("\t\t");
f_print (fout, "\t}\n");
@@ -619,20 +613,17 @@ write_program (const definition * def, const char *storage)
RETVAL, ROUTINE, ARG, RESULT, RQSTP);
if (mtflag)
f_print(fout,
- "\tif (%s > 0 && !svc_sendreply(%s, _xdr_%s, (char *)&%s)) {\n",
+ "\tif (%s > 0 && !svc_sendreply(%s, (xdrproc_t) _xdr_%s, (char *)&%s)) {\n",
RETVAL, TRANSP, RESULT, RESULT);
else
f_print(fout,
- "\tif (%s != NULL && !svc_sendreply(%s, _xdr_%s, %s)) {\n",
+ "\tif (%s != NULL && !svc_sendreply(%s, (xdrproc_t) _xdr_%s, %s)) {\n",
RESULT, TRANSP, RESULT, RESULT);
printerr ("systemerr", TRANSP);
f_print (fout, "\t}\n");
- if (Cflag)
- printif ("freeargs", TRANSP, "(caddr_t) &", ARG);
- else
- printif ("freeargs", TRANSP, "&", ARG);
+ printif ("freeargs", TRANSP, ARG);
sprintf (_errbuf, "unable to free arguments");
print_err_message ("\t\t");
@@ -661,11 +652,10 @@ printerr (const char *err, const char *transp)
}
static void
-printif (const char *proc, const char *transp, const char *prefix,
- const char *arg)
+printif (const char *proc, const char *transp, const char *arg)
{
- f_print (fout, "\tif (!svc_%s (%s, _xdr_%s, %s%s)) {\n",
- proc, transp, arg, prefix, arg);
+ f_print (fout, "\tif (!svc_%s (%s, (xdrproc_t) _xdr_%s, (caddr_t) &%s)) {\n",
+ proc, transp, arg, arg);
}
int