From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14293 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Forney Newsgroups: gmane.linux.lib.musl.general Subject: Re: Removing sys/sysmacros.h from sys/types.h Date: Sat, 29 Jun 2019 14:00:46 -0700 Message-ID: References: <20190614211502.GJ1506@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="259956"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com Original-X-From: musl-return-14309-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jun 29 23:01:04 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hhKT0-0015Wg-V1 for gllmg-musl@m.gmane.org; Sat, 29 Jun 2019 23:01:03 +0200 Original-Received: (qmail 20450 invoked by uid 550); 29 Jun 2019 21:01:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 20428 invoked from network); 29 Jun 2019 21:00:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=HICjK9od6bKqjIkauRm2nGr2r/6k6FPvG+JK6nx/7Z4=; b=RnbDqvRa4Hi7W6XlvnPalLX8ZW9BRtaBtt7j+ivfR+dac7pK23DrFPyBFGayIQ1Vux M81uCMazYoU6wSkkQSe4iRYujbXt6dSd5UmAdnlHgix6Ebz4O4EPwiBFAN2LYK/7jV2T BNUz/9UiECTDJg/bsSKKsKbRpLW3+1ZqcUln6Gl+aCWJAX82h/BxTSfRmHK5sHZjLwCP +1D5YC3tbv/AixciWHQMwv02DtnCAPoZr+UTlPiDpwS7vbL+O6HG8OsRlGUYkArfF0Tc RrXVHUzb2KqNmFO8g6XHlXWe3szRafK9T2HtCzSL0XX6qykuPAHn5oWQITmu65ZNqmbx 8DuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=HICjK9od6bKqjIkauRm2nGr2r/6k6FPvG+JK6nx/7Z4=; b=JWcUhF3rZ4v1JB8c6/2PjIIiKm1KNMvfDzsFPKdtNGeoyjPJIrgtHZH6gyiO+38PK8 jToVEjYZTCk410GbgHEa3QU1WyRAbPxDTppZA7Zx7P3B1jZQxxWgkJNh0ok7o/0otBLa b4nlH2kK1pGJ0rdVJHUbPwQFDou7uRmKmtjCOZFROaj+vTdJzjEqJLiPzUc+puZI9SNy quZ/HGk4C4jf1OFUA41//Ypw3QIGvJjnK2s+8QIgx+S1S+e0JmBQOdLcYO5jp18t3mSM ktr5Kis2acqAkH9bWFEpd9ys9GQwf9QAIwG47umJVkFg1NtLOIjj0Df4l+3YoN9MjXzu Os4g== X-Gm-Message-State: APjAAAWwPeTZex0+nx57rJJTiDLJjEXy6henE6Z5jZmx8FNEXTIQmkl1 XqSSiHJeFKEqmJZd/S2meMa7Ek/oZ7R6Winq1sY2SA4e X-Google-Smtp-Source: APXvYqz9gwxIjkJahZMSGrxA6qb65H34reLSZ1m3eU3qStWKdoO1ovDttjg4H03/4E1c2LNLsiXLvHbI6KDgLpArv8U= X-Received: by 2002:a25:7056:: with SMTP id l83mr10546817ybc.426.1561842047272; Sat, 29 Jun 2019 14:00:47 -0700 (PDT) X-Originating-IP: [2601:647:5180:35d7::cf52] In-Reply-To: <20190614211502.GJ1506@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:14293 Archived-At: On 2019-06-14, Rich Felker wrote: > On Fri, Jun 14, 2019 at 01:20:21PM -0700, Benjamin Wright wrote: >> Hello, >> >> Would it be possible to remove the sys/sysmacros.h include from >> sys/types.h? >> >> This change was added in 2011 - >> https://git.musl-libc.org/cgit/musl/commit/include/sys/types.h?id=f552c792c7ce5a560f214e1104d93ee5b0833967 >> >> However it appears to have been removed from other standard libc >> implementations around ~2015 based on this announcement: >> https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html >> >> This can cause issues with user defined symbol collision of the symbols >> major, minor or makedev. > > Yes, I'd actually forgotten we did this. I'll remove it right away in > time for the next release. I'm just curious if there is a good way to use these macros in software that is otherwise portable without adding a configure script. Most BSDs don't have sys/sysmacros.h, and now glibc and musl require including sys/sysmacros.h to use them. It's a shame that while these macros are available on most unix-like operating systems, they can't be accessed in a generic way.