From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by sourceware.org (Postfix) with ESMTPS id D3CD13938C1F for ; Mon, 12 Apr 2021 18:28:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D3CD13938C1F Received: by mail-qk1-x72c.google.com with SMTP id 130so1048377qkm.4 for ; Mon, 12 Apr 2021 11:28:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=11DN+npJPHjs771AXdaOIhiCdn/GJ36fPAeUuSGGGF4=; b=p2oCZjFtoKxWyAjB7l6xCHE6RhmUpbMY2Lt6+J+EFhVChg/7o7SCve7/yANdEvocQE YAtloMRlFMDzFq2NIEMT4fIqK+aUYQkqX7KuEZtEvcwXzYvh8nQOd9K3MSP/8CWfjbXC sTsQ4YfU/vRUXCYdtt/pL0D8/+gi5QIM8Hfzajp56ic3KdlTYHNGrnU5PbUw1JNGh74C H6iVxpsGCDq3wn9Myp6uXQPnyAkobjguLxYbSyy1zUHTvMa6DZMKYF1f/3gJxh2q89DH HBh7TfXZlgmn5qnrc3wPl/uYet0YuV4JjiqnVkTWoRB8zPSl8F49WolORoBTL+X+OuMF Q92g== X-Gm-Message-State: AOAM5316307V1FNa6LUA+CoWmuDIET85C8KftXFX7yqW50nf8TPosMUv OfFwWiGY4uhhQMV4axaga1wXpVmYyscvO925 X-Google-Smtp-Source: ABdhPJy+mve2lvDtLISub0fUpFqjWflnfjITFLLHsPofRoXmyed2yZrtmL8G9ZbUyDWkcCaUb2aSEw== X-Received: by 2002:a37:a7c7:: with SMTP id q190mr6820785qke.146.1618252086331; Mon, 12 Apr 2021 11:28:06 -0700 (PDT) Received: from [192.168.1.132] ([177.194.41.149]) by smtp.gmail.com with ESMTPSA id c19sm7978547qte.75.2021.04.12.11.28.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Apr 2021 11:28:06 -0700 (PDT) From: Adhemerval Zanella Subject: Re: Where are SHMMIN and SHMMAX of shmget(2) defined? To: Libc-help References: Message-ID: Date: Mon, 12 Apr 2021 15:28:04 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 18:28:07 -0000 On 12/04/2021 14:27, Peng Yu via Libc-help wrote: > Hi, > > shmget(2) mentions SHMMIN and SHMMAX. > > But I don't see where they are defined and what their values are. Does > anybody know where they are defined? > > gcc -E -dD - <<< '#include ' | grep 'SHMMAX\|SHMMIN' > They are provided by the kernel headers since it is system specific and glibc does not define them as extensions: | $ gcc -E -dD - <<< '#include ' | grep 'SHMMAX\|SHMMIN' | #define SHMMIN 1 | #define SHMMAX (ULONG_MAX - (1UL << 24))