From patchwork Fri May 11 19:40:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tulio Magno Quites Machado Filho X-Patchwork-Id: 27250 Received: (qmail 101982 invoked by alias); 11 May 2018 19:40:58 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 101953 invoked by uid 89); 11 May 2018 19:40:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com From: Tulio Magno Quites Machado Filho To: libc-alpha@sourceware.org Subject: [PATCH] Move M_DECL_FUNC_R* to math-type-macros.h Date: Fri, 11 May 2018 16:40:45 -0300 X-TM-AS-GCONF: 00 x-cbid: 18051119-0028-0000-0000-000009992B27 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009007; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000260; SDB=6.01030866; UDB=6.00526874; IPR=6.00809997; MB=3.00021055; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-11 19:40:52 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051119-0029-0000-0000-00003AC66A5A Message-Id: <20180511194045.7701-1-tuliom@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-11_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805110179 Thread-safe math functions (*_r) have a different naming scheme that doesn't fit the M_SUF() / M_DECL_FUNC() mechanism. Move the M_DECL_FUNC_R() implementation from w_lgamma_r_template.c to math-type-macros.h in order to reuse these macros in other functions. 2018-05-11 Tulio Magno Quites Machado Filho * math/w_lgamma_r_template.c (M_DECL_FUNC_R_X, M_DECL_FUNC_R_S, M_DECL_FUNC_R): Moved to... * sysdeps/generic/math-type-macros.h (M_DECL_FUNC_R_X, M_DECL_FUNC_R_S, M_DECL_FUNC_R): ... here. Signed-off-by: Tulio Magno Quites Machado Filho --- math/w_lgamma_r_template.c | 8 -------- sysdeps/generic/math-type-macros.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/math/w_lgamma_r_template.c b/math/w_lgamma_r_template.c index ca54e42b61..880ff8065e 100644 --- a/math/w_lgamma_r_template.c +++ b/math/w_lgamma_r_template.c @@ -26,14 +26,6 @@ # include # include -#define M_DECL_FUNC_R_X(x) x ## _r -#define M_DECL_FUNC_R_S(x) M_DECL_FUNC_R_X (x) -#define M_DECL_FUNC_R(x) M_DECL_FUNC_R_S (M_SUF (x)) - -#define M_CALL_FUNC_R_X(x) x ## _r -#define M_CALL_FUNC_R_S(x) M_CALL_FUNC_R_X (x) -#define M_CALL_FUNC_R(x) M_CALL_FUNC_R_S (M_SUF (x)) - FLOAT M_DECL_FUNC_R (__lgamma) (FLOAT x, int *signgamp) { diff --git a/sysdeps/generic/math-type-macros.h b/sysdeps/generic/math-type-macros.h index c86ac3361e..2e3f227b4f 100644 --- a/sysdeps/generic/math-type-macros.h +++ b/sysdeps/generic/math-type-macros.h @@ -124,4 +124,16 @@ # define M_DECL_FUNC(f) M_SUF (f) #endif +#ifndef M_DECL_FUNC_R +# define M_DECL_FUNC_R_X(x) x ## _r +# define M_DECL_FUNC_R_S(x) M_DECL_FUNC_R_X (x) +# define M_DECL_FUNC_R(x) M_DECL_FUNC_R_S (M_SUF (x)) +#endif + +#ifndef M_CALL_FUNC_R +# define M_CALL_FUNC_R_X(x) x ## _r +# define M_CALL_FUNC_R_S(x) M_CALL_FUNC_R_X (x) +# define M_CALL_FUNC_R(x) M_CALL_FUNC_R_S (M_SUF (x)) +#endif + #endif /* _MATH_TYPE_MACROS */