From patchwork Thu Dec 7 18:19:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaakov Selkowitz X-Patchwork-Id: 121053 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8695768qgn; Thu, 7 Dec 2017 10:21:28 -0800 (PST) X-Google-Smtp-Source: AGs4zMa5KII4+jpdZ/nqiChj5nehPlYLcuiBh+M9xfC9DQgmvq+jtOC+L2r79TLDm9OD06EsDndq X-Received: by 10.99.63.3 with SMTP id m3mr25419583pga.384.1512670888543; Thu, 07 Dec 2017 10:21:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512670888; cv=none; d=google.com; s=arc-20160816; b=hAU0BIygojEEzkkLizB51bA5GRY/NAlJPoRVkUZOkHiN+fkKNmp09kMWBa+bhjrSqo oXr+xednGY6PpDMZ+GdEdBDVCWHVOysLsJXgoBCq8pRD9W04lAFaTC0WvMmPgB3Lx+1s LUVpgNlOfYyE378a9MBmQuLUBi+AuYfqXw1g2eZaxbkiSmHUg3zFtIZDJ3pQa/nYQ+J2 S79PPpdmVukULcVM7MeTeHIDi4Pz+r13zFegv5qyyrvJYrAhWXnGOBTPTLNMoe9p9mTH wxgZCgCRNL1RlmE0/Le85N0BNPIfbsDVe8dx37lM1Kp529jQZpt16xCLqu+2hRuYgva5 w+Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from:delivered-to :sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=z9ZtpoIANv77PRHWYNm7G23xhqmkcM7o3krdes6gEoE=; b=EMEwJl3lgSjQTb0Y/gAK/Wik1cZLa69S/QhQn0uYF2vl8cKvXxLCWk4cVod8HNBZnt sTNAInMN2T/daLtN6wS9PZ62cVp0T4ahrLel6pOafLPraMywVhkqp1aqoU3hj00d4c9v by8hRJCo75kr2zPCYcHcXLcKiBvCZQSWX0umNpFwB1VltkTBLwjiwiBpscahd2MUkm4/ S994Escj4kgvSrSYTUociLgq+yAaQOq7bWBGsnxIKK/3Gw5+z6t6fHaQANVpn/H6n9KF SoaSBuG0s/wvndjbaAeIQNsUdsautecrjawwS+ZdKdz5tp8FRC3ra4G/Bk88GU5hG1CZ xTcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=AJRGw0fA; spf=pass (google.com: domain of newlib-return-15491-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=newlib-return-15491-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id o3si4083699pld.65.2017.12.07.10.21.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 10:21:28 -0800 (PST) Received-SPF: pass (google.com: domain of newlib-return-15491-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=AJRGw0fA; spf=pass (google.com: domain of newlib-return-15491-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=newlib-return-15491-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=EPm1dGSiPcjqK3mkOTWZCdGlCIE/ftq R96OAcnX4u3KJYS03yvYpH2F8+EYejH1oGCAuVLbuSe2Fw6OSEvwchU/uGFXbd4M szhSIdBmDbfn76gLDpRj6J3BxI9eE7iRPAF1kEcEtBsk7YLf755OhTr9i1Vr+I6M y4NfPkN+OF34= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=b9qKyunEtveOvV/Zf//R+07hf7A=; b=AJRGw 0fAKdlXH7s5gO95nhRNEBkS2rB3bYJHh0eHeIW4mAHpkwHz2ieDdHg/n3RBRwzIq JNytTzoUJuBWV1fMTW5PQg3eouVOPcIBzziP6T7tNx0fAUTxdgKQ+ckir+pV2eoR i6sC0AbEMrrxxNfgBI+ixAgLp0oADdopBN1UnE= Received: (qmail 60637 invoked by alias); 7 Dec 2017 18:20:09 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Delivered-To: mailing list newlib@sourceware.org Received: (qmail 60600 invoked by uid 89); 7 Dec 2017 18:20:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=complaining X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Dec 2017 18:20:06 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0FEED5F7B2 for ; Thu, 7 Dec 2017 18:20:05 +0000 (UTC) Received: from localhost.localdomain (ovpn-120-70.rdu2.redhat.com [10.10.120.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5BF9A17CFA for ; Thu, 7 Dec 2017 18:20:04 +0000 (UTC) From: Yaakov Selkowitz To: newlib@sourceware.org Subject: [PATCH v2 13/17] ansification: remove _EXFNPTR, _EXPARM Date: Thu, 7 Dec 2017 12:19:05 -0600 Message-Id: <20171207181909.1112-14-yselkowi@redhat.com> In-Reply-To: <20171207181909.1112-1-yselkowi@redhat.com> References: <20171207181909.1112-1-yselkowi@redhat.com> Signed-off-by: Yaakov Selkowitz --- newlib/libc/iconv/lib/conv.h | 28 ++++++++++++------------ newlib/libc/iconv/lib/ucsconv.h | 48 ++++++++++++++++++++--------------------- newlib/libc/include/_ansi.h | 4 ---- newlib/libc/include/rpc/xdr.h | 26 +++++++++++----------- newlib/libc/include/sys/reent.h | 30 +++++++++++++------------- newlib/libc/search/bsearch.c | 2 +- newlib/libc/stdio/fseeko.c | 2 +- newlib/libc/stdio64/fseeko64.c | 2 +- newlib/libc/stdlib/atexit.c | 2 +- newlib/libc/stdlib/on_exit.c | 2 +- newlib/libc/xdr/xdr_private.h | 2 +- newlib/libc/xdr/xdr_rec.c | 4 ++-- newlib/libc/xdr/xdr_sizeof.c | 6 +++--- 13 files changed, 77 insertions(+), 81 deletions(-) -- 2.15.1 diff --git a/newlib/libc/iconv/lib/conv.h b/newlib/libc/iconv/lib/conv.h index 89da4b224..658ab9152 100644 --- a/newlib/libc/iconv/lib/conv.h +++ b/newlib/libc/iconv/lib/conv.h @@ -63,9 +63,9 @@ typedef struct * Pointer to conversion-specific data if success. In case of error * returns NULL and sets current thread's/process's errno. */ - void *_EXFNPTR(open, (struct _reent *rptr, + void *(*open) (struct _reent *rptr, const char *to, - const char *from)); + const char *from); /* * close - close conversion. @@ -81,8 +81,8 @@ typedef struct * When successful, returns (size_t)0. In case of error, sets current * thread's/process's errno and returns (size_t)-1 (same as iconv_open()). */ - size_t _EXFNPTR(close, (struct _reent *rptr, - void *data)); + size_t (*close) (struct _reent *rptr, + void *data); /* convert - perform encoding conversion. * @@ -114,13 +114,13 @@ typedef struct * Reversible conversions are not counted. In case of error, sets current * thread's/process's errno and returns (size_t)-1 (same as iconv()). */ - size_t _EXFNPTR(convert, (struct _reent *rptr, + size_t (*convert) (struct _reent *rptr, void *data, const unsigned char **inbuf, size_t *inbytesleft, unsigned char **outbuf, size_t *outbytesleft, - int flags)); + int flags); /* * get_state - get current shift state. @@ -135,9 +135,9 @@ typedef struct * If 'direction' is 0, "from" encoding is tested, else * "to" encoding is tested. */ - void _EXFNPTR(get_state, (void *data, + void (*get_state) (void *data, mbstate_t *state, - int direction)); + int direction); /* * set_state - set shift state. @@ -154,9 +154,9 @@ typedef struct * "to" encoding is set. * Returns 0 if '*state' object has right format, -1 else. */ - int _EXFNPTR(set_state, (void *data, + int (*set_state) (void *data, mbstate_t *state, - int direction)); + int direction); /* * get_mb_cur_max - get maximum character length in bytes. @@ -170,8 +170,8 @@ typedef struct * If 'direction' is 0, "from" encoding is tested, else * "to" encoding is tested. */ - int _EXFNPTR(get_mb_cur_max, (void *data, - int direction)); + int (*get_mb_cur_max) (void *data, + int direction); /* * is_stateful - is encoding stateful or stateless. @@ -185,8 +185,8 @@ typedef struct * If 'direction' is 0, "from" encoding is tested, else * "to" encoding is tested. */ - int _EXFNPTR(is_stateful, (void *data, - int direction)); + int (*is_stateful) (void *data, + int direction); } iconv_conversion_handlers_t; diff --git a/newlib/libc/iconv/lib/ucsconv.h b/newlib/libc/iconv/lib/ucsconv.h index 391daed35..2c3d8c647 100644 --- a/newlib/libc/iconv/lib/ucsconv.h +++ b/newlib/libc/iconv/lib/ucsconv.h @@ -68,8 +68,8 @@ typedef struct * Returns CES-specific data pointer if success. In case of error returns * NULL and sets current thread's/process's errno. */ - void *_EXFNPTR(init, (struct _reent *rptr, - const char *encoding)); + void *(*init) (struct _reent *rptr, + const char *encoding); /* * close - close CES converter. @@ -84,8 +84,8 @@ typedef struct * Returns (size_t)0 if success. In case of error returns (size_t)-1 and * sets current thread's/process's errno. */ - size_t _EXFNPTR(close, (struct _reent *rptr, - void *data)); + size_t (*close) (struct _reent *rptr, + void *data); /* * get_mb_cur_max - get maximum character length in bytes. @@ -96,7 +96,7 @@ typedef struct * DESCRIPTION: * Returns encoding's maximum character length. */ - int _EXFNPTR(get_mb_cur_max, (void *data)); + int (*get_mb_cur_max) (void *data); /* * get_state - get current shift state. @@ -108,8 +108,8 @@ typedef struct * DESCRIPTION: * Returns encoding's current shift sequence. */ - void _EXFNPTR(get_state, (void *data, - mbstate_t *state)); + void (*get_state) (void *data, + mbstate_t *state); /* * set_state - set shift state. @@ -123,8 +123,8 @@ typedef struct * object is zero-object - reset current shift state. * Returns 0 if '*state' object has right format, -1 else. */ - int _EXFNPTR(set_state, (void *data, - mbstate_t *state)); + int (*set_state) (void *data, + mbstate_t *state); /* * is_stateful - is encoding stateful state. @@ -135,7 +135,7 @@ typedef struct * DESCRIPTION: * Returns 0 if encoding is stateless, else returns 1. */ - int _EXFNPTR(is_stateful, (void *data)); + int (*is_stateful) (void *data); /* * convert_to_ucs - convert character to UCS. @@ -155,9 +155,9 @@ typedef struct * returns ICONV_CES_INVALID_CHARACTER. If invalid or incomplete bytes * sequence was met, returns ICONV_CES_BAD_SEQUENCE. */ - ucs4_t _EXFNPTR(convert_to_ucs, (void *data, + ucs4_t (*convert_to_ucs) (void *data, const unsigned char **inbuf, - size_t *inbytesleft)); + size_t *inbytesleft); } iconv_to_ucs_ces_handlers_t; @@ -172,26 +172,26 @@ typedef struct typedef struct { /* Same as in iconv_to_ucs_ces_handlers_t */ - void *_EXFNPTR(init, (struct _reent *rptr, - const char *encoding)); + void *(*init) (struct _reent *rptr, + const char *encoding); /* Same as in iconv_to_ucs_ces_handlers_t */ - size_t _EXFNPTR(close, (struct _reent *rptr, - void *data)); + size_t (*close) (struct _reent *rptr, + void *data); /* Same as in iconv_to_ucs_ces_handlers_t */ - int _EXFNPTR(get_mb_cur_max, (void *data)); + int (*get_mb_cur_max) (void *data); /* Same as in iconv_to_ucs_ces_handlers_t */ - void _EXFNPTR(get_state, (void *data, - mbstate_t *state)); + void (*get_state) (void *data, + mbstate_t *state); /* Same as in iconv_to_ucs_ces_handlers_t */ - int _EXFNPTR(set_state, (void *data, - mbstate_t *state)); + int (*set_state) (void *data, + mbstate_t *state); /* Same as in iconv_to_ucs_ces_handlers_t */ - int _EXFNPTR(is_stateful, (void *data)); + int (*is_stateful) (void *data); /* * convert_from_ucs - convert UCS character to destination encoding. @@ -215,10 +215,10 @@ typedef struct * If there is no corresponding character in destination encoding, returns * ICONV_CES_INVALID_CHARACTER. */ - size_t _EXFNPTR(convert_from_ucs, (void *data, + size_t (*convert_from_ucs) (void *data, ucs4_t in, unsigned char **outbuf, - size_t *outbytesleft)); + size_t *outbytesleft); } iconv_from_ucs_ces_handlers_t; diff --git a/newlib/libc/include/_ansi.h b/newlib/libc/include/_ansi.h index 951617520..3e2490088 100644 --- a/newlib/libc/include/_ansi.h +++ b/newlib/libc/include/_ansi.h @@ -50,13 +50,9 @@ #ifdef __CYGWIN__ #define _EXFUN_NOTHROW(name, proto) __cdecl name proto _NOTHROW #define _EXFUN(name, proto) __cdecl name proto -#define _EXPARM(name, proto) (* __cdecl name) proto -#define _EXFNPTR(name, proto) (__cdecl * name) proto #else #define _EXFUN_NOTHROW(name, proto) name proto _NOTHROW #define _EXFUN(name, proto) name proto -#define _EXPARM(name, proto) (* name) proto -#define _EXFNPTR(name, proto) (* name) proto #endif #ifndef _LONG_DOUBLE #define _LONG_DOUBLE long double diff --git a/newlib/libc/include/rpc/xdr.h b/newlib/libc/include/rpc/xdr.h index 40ddc1cdd..bda8e9926 100644 --- a/newlib/libc/include/rpc/xdr.h +++ b/newlib/libc/include/rpc/xdr.h @@ -111,34 +111,34 @@ typedef struct __rpc_xdr const struct xdr_ops { /* get a long from underlying stream */ - bool_t _EXFNPTR (x_getlong, (struct __rpc_xdr *, long *)); + bool_t (*x_getlong) (struct __rpc_xdr *, long *); /* put a long to " */ - bool_t _EXFNPTR (x_putlong, (struct __rpc_xdr *, const long *)); + bool_t (*x_putlong) (struct __rpc_xdr *, const long *); /* get some bytes from " */ - bool_t _EXFNPTR (x_getbytes, (struct __rpc_xdr *, char *, u_int)); + bool_t (*x_getbytes) (struct __rpc_xdr *, char *, u_int); /* put some bytes to " */ - bool_t _EXFNPTR (x_putbytes, (struct __rpc_xdr *, const char *, u_int)); + bool_t (*x_putbytes) (struct __rpc_xdr *, const char *, u_int); /* returns bytes off from beginning */ - u_int _EXFNPTR (x_getpostn, (struct __rpc_xdr *)); + u_int (*x_getpostn) (struct __rpc_xdr *); /* lets you reposition the stream */ - bool_t _EXFNPTR (x_setpostn, (struct __rpc_xdr *, u_int)); + bool_t (*x_setpostn) (struct __rpc_xdr *, u_int); /* buf quick ptr to buffered data */ - int32_t * _EXFNPTR (x_inline, (struct __rpc_xdr *, u_int)); + int32_t * (*x_inline) (struct __rpc_xdr *, u_int); /* free privates of this xdr_stream */ - void _EXFNPTR (x_destroy, (struct __rpc_xdr *)); + void (*x_destroy) (struct __rpc_xdr *); /* get an int32 from this xdr_stream */ - bool_t _EXFNPTR (x_getint32, (struct __rpc_xdr *, int32_t *)); + bool_t (*x_getint32) (struct __rpc_xdr *, int32_t *); /* put an int32 to the underlying stream */ - bool_t _EXFNPTR (x_putint32, (struct __rpc_xdr *, const int32_t *)); + bool_t (*x_putint32) (struct __rpc_xdr *, const int32_t *); } *x_ops; char *x_public; /* users' data */ @@ -156,7 +156,7 @@ typedef struct __rpc_xdr * allocate dynamic storage of the appropriate size and return it. * bool_t (*xdrproc_t)(XDR *, some_type *) */ -typedef bool_t _EXFNPTR(xdrproc_t, (XDR *, ...)); +typedef bool_t (*xdrproc_t) (XDR *, ...); /* * Operations defined on a XDR handle @@ -366,8 +366,8 @@ extern void _EXFUN (xdrstdio_create, (XDR *, FILE *, enum xdr_op)); /* XDR pseudo records for tcp */ extern void _EXFUN (xdrrec_create, (XDR *, u_int, u_int, void *, - int _EXPARM (, (void *, void *, int)), - int _EXPARM (, (void *, void *, int)))); + int (*) (void *, void *, int), + int (*) (void *, void *, int))); /* make end of xdr record */ extern bool_t _EXFUN (xdrrec_endofrecord, (XDR *, bool_t)); diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h index cfb79edd3..54fdf96f1 100644 --- a/newlib/libc/include/sys/reent.h +++ b/newlib/libc/include/sys/reent.h @@ -194,13 +194,13 @@ struct __sFILE { /* operations */ void * _cookie; /* cookie passed to io functions */ - _READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, void *, - char *, _READ_WRITE_BUFSIZE_TYPE)); - _READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, void *, + _READ_WRITE_RETURN_TYPE (*_read) (struct _reent *, void *, + char *, _READ_WRITE_BUFSIZE_TYPE); + _READ_WRITE_RETURN_TYPE (*_write) (struct _reent *, void *, const char *, - _READ_WRITE_BUFSIZE_TYPE)); - _fpos_t _EXFNPTR(_seek, (struct _reent *, void *, _fpos_t, int)); - int _EXFNPTR(_close, (struct _reent *, void *)); + _READ_WRITE_BUFSIZE_TYPE); + _fpos_t (*_seek) (struct _reent *, void *, _fpos_t, int); + int (*_close) (struct _reent *, void *); /* separate buffer for long sequences of ungetc() */ struct __sbuf _ub; /* ungetc buffer */ @@ -250,13 +250,13 @@ struct __sFILE64 { /* operations */ void * _cookie; /* cookie passed to io functions */ - _READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, void *, - char *, _READ_WRITE_BUFSIZE_TYPE)); - _READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, void *, + _READ_WRITE_RETURN_TYPE (*_read) (struct _reent *, void *, + char *, _READ_WRITE_BUFSIZE_TYPE); + _READ_WRITE_RETURN_TYPE (*_write) (struct _reent *, void *, const char *, - _READ_WRITE_BUFSIZE_TYPE)); - _fpos_t _EXFNPTR(_seek, (struct _reent *, void *, _fpos_t, int)); - int _EXFNPTR(_close, (struct _reent *, void *)); + _READ_WRITE_BUFSIZE_TYPE); + _fpos_t (*_seek) (struct _reent *, void *, _fpos_t, int); + int (*_close) (struct _reent *, void *); /* separate buffer for long sequences of ungetc() */ struct __sbuf _ub; /* ungetc buffer */ @@ -275,7 +275,7 @@ struct __sFILE64 { int _flags2; /* for future use */ _off64_t _offset; /* current lseek offset */ - _fpos64_t _EXFNPTR(_seek64, (struct _reent *, void *, _fpos64_t, int)); + _fpos64_t (*_seek64) (struct _reent *, void *, _fpos64_t, int); #ifndef __SINGLE_THREAD__ _flock_t _lock; /* for thread-safety locking */ @@ -391,7 +391,7 @@ struct _reent struct _mprec *_mp; - void _EXFNPTR(__cleanup, (struct _reent *)); + void (*__cleanup) (struct _reent *); int _gamma_signgam; @@ -584,7 +584,7 @@ struct _reent int __sdidinit; /* 1 means stdio has been init'd */ - void _EXFNPTR(__cleanup, (struct _reent *)); + void (*__cleanup) (struct _reent *); /* used by mprec routines */ struct _Bigint *_result; diff --git a/newlib/libc/search/bsearch.c b/newlib/libc/search/bsearch.c index 2f1dc9d77..29b787425 100644 --- a/newlib/libc/search/bsearch.c +++ b/newlib/libc/search/bsearch.c @@ -60,7 +60,7 @@ bsearch (const void *key, const void *base, size_t nmemb, size_t size, - int _EXFNPTR(compar, (const void *, const void *))) + int (*compar) (const void *, const void *)) { void *current; size_t lower = 0; diff --git a/newlib/libc/stdio/fseeko.c b/newlib/libc/stdio/fseeko.c index 7ca86161c..3e0f9e90b 100644 --- a/newlib/libc/stdio/fseeko.c +++ b/newlib/libc/stdio/fseeko.c @@ -98,7 +98,7 @@ _fseeko_r (struct _reent *ptr, _off_t offset, int whence) { - _fpos_t _EXFNPTR(seekfn, (struct _reent *, void *, _fpos_t, int)); + _fpos_t (*seekfn) (struct _reent *, void *, _fpos_t, int); _fpos_t target; _fpos_t curoff = 0; size_t n; diff --git a/newlib/libc/stdio64/fseeko64.c b/newlib/libc/stdio64/fseeko64.c index 085855d4b..0672086a3 100644 --- a/newlib/libc/stdio64/fseeko64.c +++ b/newlib/libc/stdio64/fseeko64.c @@ -90,7 +90,7 @@ _fseeko64_r (struct _reent *ptr, _off64_t offset, int whence) { - _fpos64_t _EXFNPTR(seekfn, (struct _reent *, void *, _fpos64_t, int)); + _fpos64_t (*seekfn) (struct _reent *, void *, _fpos64_t, int); _fpos64_t target, curoff; size_t n; diff --git a/newlib/libc/stdlib/atexit.c b/newlib/libc/stdlib/atexit.c index 1d300bd0f..63617f821 100644 --- a/newlib/libc/stdlib/atexit.c +++ b/newlib/libc/stdlib/atexit.c @@ -53,7 +53,7 @@ Supporting OS subroutines required: <>, <>, <>, */ int -atexit (void _EXFNPTR(fn, (void))) +atexit (void (*fn) (void)) { return __register_exitproc (__et_atexit, fn, NULL, NULL); } diff --git a/newlib/libc/stdlib/on_exit.c b/newlib/libc/stdlib/on_exit.c index ce6bac68e..2eaf03564 100644 --- a/newlib/libc/stdlib/on_exit.c +++ b/newlib/libc/stdlib/on_exit.c @@ -66,7 +66,7 @@ const void * const __on_exit_dummy = &__on_exit_args; */ int -on_exit (void _EXFNPTR(fn, (int, void *)), +on_exit (void (*fn) (int, void *), void *arg) { return __register_exitproc (__et_onexit, (void (*)(void)) fn, arg, NULL); diff --git a/newlib/libc/xdr/xdr_private.h b/newlib/libc/xdr/xdr_private.h index 2b4581866..3b071d668 100644 --- a/newlib/libc/xdr/xdr_private.h +++ b/newlib/libc/xdr/xdr_private.h @@ -41,7 +41,7 @@ extern "C" { #endif -typedef void _EXFNPTR (xdr_vprintf_t, (const char *, va_list)); +typedef void (*xdr_vprintf_t) (const char *, va_list); xdr_vprintf_t _EXFUN (xdr_set_vprintf, (xdr_vprintf_t)); diff --git a/newlib/libc/xdr/xdr_rec.c b/newlib/libc/xdr/xdr_rec.c index f46a9a3fa..9051d522f 100644 --- a/newlib/libc/xdr/xdr_rec.c +++ b/newlib/libc/xdr/xdr_rec.c @@ -173,8 +173,8 @@ xdrrec_create (XDR * xdrs, u_int sendsize, u_int recvsize, void *tcp_handle, - int _EXPARM (readit, (void *, void *, int)), - int _EXPARM (writeit, (void *, void *, int))) + int (*readit) (void *, void *, int), + int (*writeit) (void *, void *, int)) { RECSTREAM *rstrm; /* Although sendsize and recvsize are u_int, we require diff --git a/newlib/libc/xdr/xdr_sizeof.c b/newlib/libc/xdr/xdr_sizeof.c index bf02cf5e7..e086d30e7 100644 --- a/newlib/libc/xdr/xdr_sizeof.c +++ b/newlib/libc/xdr/xdr_sizeof.c @@ -142,9 +142,9 @@ xdr_sizeof (xdrproc_t func, struct xdr_ops ops; bool_t stat; /* to stop ANSI-C compiler from complaining */ - typedef bool_t _EXFNPTR (dummyfunc1, (XDR *, long *)); - typedef bool_t _EXFNPTR (dummyfunc2, (XDR *, caddr_t, u_int)); - typedef bool_t _EXFNPTR (dummyfunc3, (XDR *, int32_t *)); + typedef bool_t (*dummyfunc1) (XDR *, long *); + typedef bool_t (*dummyfunc2) (XDR *, caddr_t, u_int); + typedef bool_t (*dummyfunc3) (XDR *, int32_t *); ops.x_putlong = x_putlong; ops.x_putbytes = x_putbytes;