Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 16 Jun 2004 14:46:40 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Macros "major" and "minor" Message-ID: <20040616124640.GD25094@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <40CEEE7C DOT 8050405 AT aass DOT oru DOT se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40CEEE7C.8050405@aass.oru.se> User-Agent: Mutt/1.4.2i On Jun 15 14:41, Martin Magnusson wrote: > I recently ran into problems when compiling a matrix library containing > a function called "minor". Apparently, the file > /usr/include/sys/sysmacros.h has the following definitions: > > #ifdef __CYGWIN_USE_BIG_TYPES__ > #define major(dev) ((int)(((dev) >> 16) & 0xffff)) > #define minor(dev) ((int)((dev) & 0xffff)) > #define makedev(major, minor) (((major) << 16) | ((minor) & 0xffff)) > #else > #define major(dev) ((int)(((dev) >> 8) & 0xff)) > #define minor(dev) ((int)((dev) & 0xff)) > #define makedev(major, minor) (((major) << 8) | ((minor) & 0xff)) > #endif > > Defining macros with names like "major" and "minor" is really not good, > IMO. This should probably be changed, if possible. They are defined the same way on Linux or BSD. They are also pulled in there simply by including sys/types.h or another include file which in turn includes sys/types.h. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Co-Project Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/