zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "ZSH Workers Mailing List" <zsh-workers@sunsite.dk>,
	"Cygwin Mailing List" <Cygwin@Sourceware.Cygnus.Com>
Subject: S_IXUSR & Co macro problem - zsh does not compile under current cygwin.
Date: Fri, 27 Apr 2001 12:27:36 +0400	[thread overview]
Message-ID: <001001c0cef3$e9e9ead0$21c9ca95@mow.siemens.ru> (raw)


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 >>


             reply	other threads:[~2001-04-27  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-27  8:27 Andrej Borsenkow [this message]
2001-04-27 17:46 ` Bart Schaefer
2001-04-28  8:52   ` Andrej Borsenkow
2001-04-28 18:18     ` Bart Schaefer
2001-04-30 10:42       ` Andrej Borsenkow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001001c0cef3$e9e9ead0$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=Cygwin@Sourceware.Cygnus.Com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).