From patchwork Mon Jul 24 14:04:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugene Yudin X-Patchwork-Id: 792811 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ndmsystems-com.20150623.gappssmtp.com header.i=@ndmsystems-com.20150623.gappssmtp.com header.b="rtIXqdwF"; dkim-atps=neutral Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xGNQx3Nlyz9s4q for ; Tue, 25 Jul 2017 00:04:25 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id D0EC810119; Mon, 24 Jul 2017 15:59:31 +0200 (CEST) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from mail-qt0-f181.google.com (mail-qt0-f181.google.com [209.85.216.181]) by helium.openadk.org (Postfix) with ESMTPS id 3EC3210119 for ; Mon, 24 Jul 2017 15:59:29 +0200 (CEST) Received: by mail-qt0-f181.google.com with SMTP id 21so70600229qtx.3 for ; Mon, 24 Jul 2017 07:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndmsystems-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=AznyhiEP2cxtuQr8oCia+qbgkekgQQi0HjN4cd5ctmw=; b=rtIXqdwFHNWa62xwyRdVGrZM975vu2QdUXiQU7ULrgbC2Jn7O7R6NcHaUM7w0f4bAw /NV+0RDnkSeePQmswPjj9KFwlJp46lMNgpejWTmg1vkl8c9PCNgl+UOpHFmEpE9KK33S 8mMFebBKruFbgjh6I8Akk4kPS5i2F1akHQqqZ56BmIVNyS+iwtxblP6nhKcet6z9TK7+ +pDSbWodPFdlTiGXhgN26VaTEYhSUiXiwCq23VLTT9Xg8Y8gfqWoRBf5csP7oS5spZmG 04PjKzj8ofi2EBveTg4RbQtxwAivcKWOyfMuo/NgcDQvwcVdkXiSLKEc0HK/ukjr/qev mxvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=AznyhiEP2cxtuQr8oCia+qbgkekgQQi0HjN4cd5ctmw=; b=bXAnL3HvBRnHndaae3/JSxG1yydued6PiEzd4w6m4uv/5oM5UTZxx4QLJviLPrkEjf Xxz0uo60o18Ui5vScuNn6beObWutAM10Vd89C9aFcXafIZ1Bb6YJbWykmvECDjI8j+IA m9SgNW4t05j/aR/tPqzjToX7DmlFqJhaBTLJ91WYo6Wf4hion40U2vU3gdkVDDa+qx7G RZ0Wpwr4Nf6SeRMG8vWAl7MCh15W+QrQUTBRuzrI9WXlTbl5VXqOXK1ER2jWPNh+IM0d r8BpB0gbM6THlInkveIvyglNQHgcYhmKtF8L6SQsAcfx9hLz2V03ZcpFK6QkuiamjXeq UkAw== X-Gm-Message-State: AIVw110vlsv6LnUOFS0OFQqtqpf6B3B8eZQ42jK4tEsSptDraVLNrtjd 4w+xtPHSZ1t9bYKFnpzYFHCZ3rIY0HP4NFI= X-Received: by 10.237.62.106 with SMTP id m39mr21791409qtf.340.1500905057813; Mon, 24 Jul 2017 07:04:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.34.200 with HTTP; Mon, 24 Jul 2017 07:04:17 -0700 (PDT) From: Eugene Yudin Date: Mon, 24 Jul 2017 17:04:17 +0300 Message-ID: To: devel@uclibc-ng.org Subject: [uclibc-ng-devel] [PATCH] valloc declaration in stdlib.h X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" Hi, Current uClibc-ng have issue with several different valloc declarations. malloc.h: #ifdef __UCLIBC_SUSV2_LEGACY__ /* Allocate SIZE bytes on a page boundary. */ extern __malloc_ptr_t valloc __MALLOC_P ((size_t __size)) __attribute_malloc__; #endif stdlib.h: #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */ extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur; #endif The second declaration doesn't use the define __UCLIBC_SUSV2_LEGACY__. That leads to compile time problems. The attached patch fixes this diffrence. commit 3990f36e0ba7177cb36effe24ef72dca04c762c0 Author: Eugene Yudin Date: Wed May 4 14:56:57 2016 +0300 stdlib.h: Fix valloc declaration. diff --git a/include/stdlib.h b/include/stdlib.h index cbc0473..8947796 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -518,9 +518,11 @@ extern void cfree (void *__ptr) __THROW; # include #endif /* Use GNU, BSD, or misc. */ -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#ifdef __UCLIBC_SUSV2_LEGACY__ +# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */ extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur; +# endif #endif #if defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__