Blame SOURCES/glibc-rh1505492-prototypes-18.patch

c6d234
commit 85231522bb178ebe0957529de20b7f3dda81168c
c6d234
Author: Joseph Myers <joseph@codesourcery.com>
c6d234
Date:   Wed Oct 21 11:57:23 2015 +0000
c6d234
c6d234
    Convert a few more function definitions to prototype style.
c6d234
    
c6d234
    This patch converts a few more function definitions in glibc from
c6d234
    old-style K&R to prototype style.  This is sufficient to build and
c6d234
    test on x86_64 and x86 with -Wold-style-definition (I'll test on some
c6d234
    more architectures before proposing the actual addition of
c6d234
    -Wold-style-definition).
c6d234
    
c6d234
    Tested for x86_64 and x86 with -Wold-style-definition in use
c6d234
    (testsuite - this patch affects files containing assertions).
c6d234
    
c6d234
            * io/fts.c (fts_open): Convert to prototype-style function
c6d234
            definition.
c6d234
            * malloc/mcheck.c (mcheck): Likewise.
c6d234
            (mcheck_pedantic): Likewise.
c6d234
            * posix/regexec.c (re_search_2_stub): Likewise.  Use
c6d234
            internal_function.
c6d234
            (re_search_internal): Likewise.
c6d234
            * resolv/res_init.c [RESOLVSORT] (net_mask): Convert to
c6d234
            prototype-style function definition.
c6d234
            * sunrpc/clnt_udp.c (clntudp_call): Likewise.
c6d234
            * sunrpc/pmap_rmt.c (clnt_broadcast): Likewise.
c6d234
            * sunrpc/rpcsvc/rusers.x (xdr_utmp): Likewise.
c6d234
            (xdr_utmpptr): Likewise.
c6d234
            (xdr_utmparr): Likewise.
c6d234
            (xdr_utmpidle): Likewise.
c6d234
            (xdr_utmpidleptr): Likewise.
c6d234
            (xdr_utmpidlearr): Likewise.
c6d234
c6d234
Conflicts:
c6d234
	malloc/mcheck.c
c6d234
	  (Textual conflict due to malloc reformatting upstream.)
c6d234
	resolv/res_init.c
c6d234
	  (Already part of the stub resolver rebase in
c6d234
	  glibc-rh677316-resolv.patch.)
c6d234
c6d234
diff --git a/io/fts.c b/io/fts.c
c6d234
index 275608591739ce63..49d2de946b78f483 100644
c6d234
--- a/io/fts.c
c6d234
+++ b/io/fts.c
c6d234
@@ -85,10 +85,8 @@ static int      fts_safe_changedir (FTS *, FTSENT *, int, const char *)
c6d234
 #define	BREAD		3		/* fts_read */
c6d234
 
c6d234
 FTS *
c6d234
-fts_open(argv, options, compar)
c6d234
-	char * const *argv;
c6d234
-	int options;
c6d234
-	int (*compar) (const FTSENT **, const FTSENT **);
c6d234
+fts_open (char * const *argv, int options,
c6d234
+	  int (*compar) (const FTSENT **, const FTSENT **))
c6d234
 {
c6d234
 	FTS *sp;
c6d234
 	FTSENT *p, *root;
c6d234
diff --git a/malloc/mcheck.c b/malloc/mcheck.c
c6d234
index 680e03353e03f235..fa6b0309c5f28e79 100644
c6d234
--- a/malloc/mcheck.c
c6d234
+++ b/malloc/mcheck.c
c6d234
@@ -370,8 +370,7 @@ mabort (enum mcheck_status status)
c6d234
 ({ __typeof (x) __x = x; __asm ("" : "+m" (__x)); __x; })
c6d234
 
c6d234
 int
c6d234
-mcheck (func)
c6d234
-     void (*func) (enum mcheck_status);
c6d234
+mcheck (void (*func) (enum mcheck_status))
c6d234
 {
c6d234
   abortfunc = (func != NULL) ? func : &mabort;
c6d234
 
c6d234
@@ -402,8 +401,7 @@ libc_hidden_def (mcheck)
c6d234
 #endif
c6d234
 
c6d234
 int
c6d234
-mcheck_pedantic (func)
c6d234
-      void (*func) (enum mcheck_status);
c6d234
+mcheck_pedantic (void (*func) (enum mcheck_status))
c6d234
 {
c6d234
   int res = mcheck (func);
c6d234
   if (res == 0)
c6d234
diff --git a/posix/regexec.c b/posix/regexec.c
c6d234
index 6ca865dc9a7d44d5..7e1618561e61e41d 100644
c6d234
--- a/posix/regexec.c
c6d234
+++ b/posix/regexec.c
c6d234
@@ -343,12 +343,11 @@ weak_alias (__re_search_2, re_search_2)
c6d234
 #endif
c6d234
 
c6d234
 static int
c6d234
-re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
c6d234
-		  stop, ret_len)
c6d234
-    struct re_pattern_buffer *bufp;
c6d234
-    const char *string1, *string2;
c6d234
-    int length1, length2, start, range, stop, ret_len;
c6d234
-    struct re_registers *regs;
c6d234
+internal_function
c6d234
+re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
c6d234
+		  int length1, const char *string2, int length2, int start,
c6d234
+		  int range, struct re_registers *regs,
c6d234
+		  int stop, int ret_len)
c6d234
 {
c6d234
   const char *str;
c6d234
   int rval;
c6d234
@@ -604,14 +603,10 @@ re_exec (const char *s)
c6d234
    (START + RANGE >= 0 && START + RANGE <= LENGTH)  */
c6d234
 
c6d234
 static reg_errcode_t
c6d234
-__attribute_warn_unused_result__
c6d234
-re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
c6d234
-		    eflags)
c6d234
-    const regex_t *preg;
c6d234
-    const char *string;
c6d234
-    int length, start, range, stop, eflags;
c6d234
-    size_t nmatch;
c6d234
-    regmatch_t pmatch[];
c6d234
+__attribute_warn_unused_result__ internal_function
c6d234
+re_search_internal (const regex_t *preg, const char *string, int length,
c6d234
+		    int start, int range, int stop, size_t nmatch,
c6d234
+		    regmatch_t pmatch[], int eflags)
c6d234
 {
c6d234
   reg_errcode_t err;
c6d234
   const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
c6d234
diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
c6d234
index 1e0c7d45d33d23a1..069768ac213aa116 100644
c6d234
--- a/sunrpc/clnt_udp.c
c6d234
+++ b/sunrpc/clnt_udp.c
c6d234
@@ -293,14 +293,20 @@ is_network_up (int sock)
c6d234
 }
c6d234
 
c6d234
 static enum clnt_stat
c6d234
-clntudp_call (cl, proc, xargs, argsp, xresults, resultsp, utimeout)
c6d234
-     CLIENT *cl;	/* client handle */
c6d234
-     u_long proc;		/* procedure number */
c6d234
-     xdrproc_t xargs;		/* xdr routine for args */
c6d234
-     caddr_t argsp;		/* pointer to args */
c6d234
-     xdrproc_t xresults;	/* xdr routine for results */
c6d234
-     caddr_t resultsp;		/* pointer to results */
c6d234
-     struct timeval utimeout;	/* seconds to wait before giving up */
c6d234
+clntudp_call (/* client handle */
c6d234
+	      CLIENT *cl,
c6d234
+	      /* procedure number */
c6d234
+	      u_long proc,
c6d234
+	      /* xdr routine for args */
c6d234
+	      xdrproc_t xargs,
c6d234
+	      /* pointer to args */
c6d234
+	      caddr_t argsp,
c6d234
+	      /* xdr routine for results */
c6d234
+	      xdrproc_t xresults,
c6d234
+	      /* pointer to results */
c6d234
+	      caddr_t resultsp,
c6d234
+	      /* seconds to wait before giving up */
c6d234
+	      struct timeval utimeout)
c6d234
 {
c6d234
   struct cu_data *cu = (struct cu_data *) cl->cl_private;
c6d234
   XDR *xdrs;
c6d234
diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c
c6d234
index c8a8011ea5474b3b..e54fe1447004c6b1 100644
c6d234
--- a/sunrpc/pmap_rmt.c
c6d234
+++ b/sunrpc/pmap_rmt.c
c6d234
@@ -196,15 +196,22 @@ getbroadcastnets (struct in_addr *addrs, int naddrs)
c6d234
 
c6d234
 
c6d234
 enum clnt_stat
c6d234
-clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
c6d234
-     u_long prog;		/* program number */
c6d234
-     u_long vers;		/* version number */
c6d234
-     u_long proc;		/* procedure number */
c6d234
-     xdrproc_t xargs;		/* xdr routine for args */
c6d234
-     caddr_t argsp;		/* pointer to args */
c6d234
-     xdrproc_t xresults;	/* xdr routine for results */
c6d234
-     caddr_t resultsp;		/* pointer to results */
c6d234
-     resultproc_t eachresult;	/* call with each result obtained */
c6d234
+clnt_broadcast (/* program number */
c6d234
+		u_long prog,
c6d234
+		/* version number */
c6d234
+		u_long vers,
c6d234
+		/* procedure number */
c6d234
+		u_long proc,
c6d234
+		/* xdr routine for args */
c6d234
+		xdrproc_t xargs,
c6d234
+		/* pointer to args */
c6d234
+		caddr_t argsp,
c6d234
+		/* xdr routine for results */
c6d234
+		xdrproc_t xresults,
c6d234
+		/* pointer to results */
c6d234
+		caddr_t resultsp,
c6d234
+		/* call with each result obtained */
c6d234
+		resultproc_t eachresult)
c6d234
 {
c6d234
   enum clnt_stat stat = RPC_FAILED;
c6d234
   AUTH *unix_auth = authunix_create_default ();
c6d234
diff --git a/sunrpc/rpcsvc/rusers.x b/sunrpc/rpcsvc/rusers.x
c6d234
index 476ed7400c445d2a..5bbfe97e79e27aa2 100644
c6d234
--- a/sunrpc/rpcsvc/rusers.x
c6d234
+++ b/sunrpc/rpcsvc/rusers.x
c6d234
@@ -137,9 +137,7 @@ program RUSERSPROG {
c6d234
 %bool_t xdr_utmp (XDR *xdrs, struct ru_utmp *objp);
c6d234
 %
c6d234
 %bool_t
c6d234
-%xdr_utmp(xdrs, objp)
c6d234
-%	XDR *xdrs;
c6d234
-%	struct ru_utmp *objp;
c6d234
+%xdr_utmp (XDR *xdrs, struct ru_utmp *objp)
c6d234
 %{
c6d234
 %	/* Since the fields are char foo [xxx], we should not free them. */
c6d234
 %	if (xdrs->x_op != XDR_FREE)
c6d234
@@ -171,9 +169,7 @@ program RUSERSPROG {
c6d234
 %bool_t xdr_utmpptr(XDR *xdrs, struct ru_utmp **objpp);
c6d234
 %
c6d234
 %bool_t
c6d234
-%xdr_utmpptr(xdrs, objpp)
c6d234
-%	XDR *xdrs;
c6d234
-%	struct ru_utmp **objpp;
c6d234
+%xdr_utmpptr (XDR *xdrs, struct ru_utmp **objpp)
c6d234
 %{
c6d234
 %	if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct ru_utmp),
c6d234
 %			   (xdrproc_t) xdr_utmp)) {
c6d234
@@ -183,9 +179,7 @@ program RUSERSPROG {
c6d234
 %}
c6d234
 %
c6d234
 %bool_t
c6d234
-%xdr_utmparr(xdrs, objp)
c6d234
-%	XDR *xdrs;
c6d234
-%	struct utmparr *objp;
c6d234
+%xdr_utmparr (XDR *xdrs, struct utmparr *objp)
c6d234
 %{
c6d234
 %	if (!xdr_array(xdrs, (char **)&objp->uta_arr, (u_int *)&objp->uta_cnt,
c6d234
 %		       MAXUSERS, sizeof(struct ru_utmp *),
c6d234
@@ -198,9 +192,7 @@ program RUSERSPROG {
c6d234
 %bool_t xdr_utmpidle(XDR *xdrs, struct utmpidle *objp);
c6d234
 %
c6d234
 %bool_t
c6d234
-%xdr_utmpidle(xdrs, objp)
c6d234
-%	XDR *xdrs;
c6d234
-%	struct utmpidle *objp;
c6d234
+%xdr_utmpidle (XDR *xdrs, struct utmpidle *objp)
c6d234
 %{
c6d234
 %	if (!xdr_utmp(xdrs, &objp->ui_utmp)) {
c6d234
 %		return (FALSE);
c6d234
@@ -214,9 +206,7 @@ program RUSERSPROG {
c6d234
 %bool_t xdr_utmpidleptr(XDR *xdrs, struct utmpidle **objp);
c6d234
 %
c6d234
 %bool_t
c6d234
-%xdr_utmpidleptr(xdrs, objpp)
c6d234
-%	XDR *xdrs;
c6d234
-%	struct utmpidle **objpp;
c6d234
+%xdr_utmpidleptr (XDR *xdrs, struct utmpidle **objpp)
c6d234
 %{
c6d234
 %	if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct utmpidle),
c6d234
 %			   (xdrproc_t) xdr_utmpidle)) {
c6d234
@@ -226,9 +216,7 @@ program RUSERSPROG {
c6d234
 %}
c6d234
 %
c6d234
 %bool_t
c6d234
-%xdr_utmpidlearr(xdrs, objp)
c6d234
-%	XDR *xdrs;
c6d234
-%	struct utmpidlearr *objp;
c6d234
+%xdr_utmpidlearr (XDR *xdrs, struct utmpidlearr *objp)
c6d234
 %{
c6d234
 %	if (!xdr_array(xdrs, (char **)&objp->uia_arr, (u_int *)&objp->uia_cnt,
c6d234
 %		       MAXUSERS, sizeof(struct utmpidle *),