| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-ID: | <40CEEE7C.8050405@aass.oru.se> |
| Date: | Tue, 15 Jun 2004 14:41:32 +0200 |
| From: | Martin Magnusson <martin DOT magnusson AT aass DOT oru DOT se> |
| Organization: | =?ISO-8859-1?Q?=D6rebro_Universitet?= |
| User-Agent: | Mozilla Thunderbird 0.6+ (Windows/20040608) |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Macros "major" and "minor" |
| X-oru-MailScanner: | Found to be clean |
| X-MailScanner-From: | martin DOT magnusson AT aass DOT oru DOT se |
| X-IsSubscribed: | yes |
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. / martin -- 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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |