delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/27/04:38:41

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Envelope-Sender-Is: Andrej DOT Borsenkow AT mow DOT siemens DOT ru (at relayer david.siemens.de)
From: "Andrej Borsenkow" <Andrej DOT Borsenkow AT mow DOT siemens DOT ru>
To: "ZSH Workers Mailing List" <zsh-workers AT sunsite DOT dk>,
"Cygwin Mailing List" <Cygwin AT Sourceware DOT Cygnus DOT Com>
Subject: S_IXUSR & Co macro problem - zsh does not compile under current cygwin.
Date: Fri, 27 Apr 2001 12:27:36 +0400
Message-ID: <001001c0cef3$e9e9ead0$21c9ca95@mow.siemens.ru>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

Just updated to the lates cygwin-1.3.1-1

gcc -c -I.  -DHAVE_CONFIG_H -DMODULE -Wall -Wno-implicit -Wmissing-prototypes 
-O
2  -o stat..o /tools/src/zsh/Src/Modules/stat.c
/tools/src/zsh/Src/Modules/stat.c: In function `statmodeprint':
/tools/src/zsh/Src/Modules/stat.c:57: initializer element is not constant
/tools/src/zsh/Src/Modules/stat.c:57: (near initialization for `mflags[2]')
/tools/src/zsh/Src/Modules/stat.c:58: initializer element is not constant
/tools/src/zsh/Src/Modules/stat.c:58: (near initialization for `mflags[5]')
/tools/src/zsh/Src/Modules/stat.c:59: initializer element is not constant
/tools/src/zsh/Src/Modules/stat.c:59: (near initialization for `mflags[8]')

relevat part of stat.c:

    if (flags & STF_STRING) {
        static const char *modes = "?rwxrwxrwx";
        static const mode_t mflags[] = { S_IRUSR, S_IWUSR, S_IXUSR,
                                         S_IRGRP, S_IWGRP, S_IXGRP,
                                         S_IROTH, S_IWOTH, S_IXOTH };

And from /usr/include/sys/stat.h:

#if defined (__CYGWIN__) && !defined (__INSIDE_CYGWIN__)
extern unsigned const _cygwin_S_IEXEC, _cygwin_S_IXUSR, _cygwin_S_IXGRP,
_cygwin
_S_IXOTH;
#undef S_IEXEC
#undef S_IXUSR
#undef S_IXGRP
#undef S_IXOTH
#define S_IEXEC         _cygwin_S_IEXEC
#define S_IXUSR         _cygwin_S_IXUSR
#define S_IXGRP         _cygwin_S_IXGRP
#define S_IXOTH         _cygwin_S_IXOTH
#endif


SUS does not clear specify if these macros should be #defines. But, is it
necessary to make them external variables? const is real const in C++ but not
in C, sigh.

-andrej

Have a nice DOS!
B >>


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019