Jason --
 
> I'm trying to build parrot on my Windows 2000 box and am failing when
> compiling core_ops.c with these errors:
> 
> core_ops.c(370) : error C2065: 'S_IRUSR' : undeclared identifier
> core_ops.c(370) : error C2065: 'S_IWUSR' : undeclared identifier
> core_ops.c(370) : error C2065: 'S_IRGRP' : undeclared identifier
> core_ops.c(370) : error C2065: 'S_IROTH' : undeclared identifier
> 
> It looks like you checked those new ops in just a few hours ago. I've
> searched for those symbols but the Microsoft header files don't seem to
> define them anywhere.
> 
> Any suggestions?

Sorry about that. I only have one Windows machine, and its not set up for
development. These are constants from a couple of *nix headers. On the
system I'm using right now, I have this:

  #define __S_IREAD       0400    /* Read by owner.  */
  #define __S_IWRITE      0200    /* Write by owner.  */
  #define __S_IEXEC       0100    /* Execute by owner.  */

in /usr/include/bits/stat.h, and this:

  #define S_IRUSR __S_IREAD       /* Read by owner.  */
  #define S_IWUSR __S_IWRITE      /* Write by owner.  */
  #define S_IXUSR __S_IEXEC       /* Execute by owner.  */
  /* Read, write, and execute by owner.  */
  #define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC)

  #define S_IRGRP (S_IRUSR >> 3)  /* Read by group.  */
  #define S_IWGRP (S_IWUSR >> 3)  /* Write by group.  */
  #define S_IXGRP (S_IXUSR >> 3)  /* Execute by group.  */
  /* Read, write, and execute by group.  */
  #define S_IRWXG (S_IRWXU >> 3)

  #define S_IROTH (S_IRGRP >> 3)  /* Read by others.  */
  #define S_IWOTH (S_IWGRP >> 3)  /* Write by others.  */
  #define S_IXOTH (S_IXGRP >> 3)  /* Execute by others.  */
  /* Read, write, and execute by others.  */
  #define S_IRWXO (S_IRWXG >> 3)

in /usr/include/sys/stat.h. As for what to includ in Windows to get
these (if anything), or what should be done to get them, I'm unsure.
I suppose for now, you could paste the above into a header file
somewhere with a #ifdef WIN32 around it to get things compiling.

Let me know if you get it working. Patches encouraged.


Regards,

-- Gregor


Reply via email to