Skip to content

Commit

Permalink
Fix -p function and Fcntl::S_IFIFO constant under Microsoft VC compiler
Browse files Browse the repository at this point in the history
Create S_IFIFO macro as an alias for _S_IFIFO if only the latter is being
defined by the standard headers (e.g. Microsoft Visual C++).

This is necessary to get the C<-p> function working, and also to define
the Fcntl::S_IFIFO constant.

See also http://bugs.activestate.com/show_bug.cgi?id=82665

Cheers,
-Jan

From 6386a37b103723e3c473119b95dd0b8edc59a1ed Mon Sep 17 00:00:00 2001
From: Jan Dubois <jand@activestate.com>
Date: Mon, 27 Apr 2009 15:44:23 -0700
Subject: [PATCH] Create S_IFIFO macro as an alias for _S_IFIFO if only the latter is being
 defined by the standard headers (e.g. Microsoft Visual C++).

This is necessary to get the C<-p> function working, and also to define
the Fcntl::S_IFIFO constant.

See also http://bugs.activestate.com/show_bug.cgi?id=82665

Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
  • Loading branch information
jandubois authored and H.Merijn Brand committed Apr 28, 2009
1 parent bb23f8d commit 287a962
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions perl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,13 @@ EXTERN_C int usleep(unsigned int);
# include <sys/stat.h>
#endif

/* Microsoft VC's sys/stat.h defines all S_Ixxx macros except S_IFIFO.
This definition should ideally go into win32/win32.h, but S_IFIFO is
used later here in perl.h before win32/win32.h is being included. */
#if !defined(S_IFIFO) && defined(_S_IFIFO)
# define S_IFIFO _S_IFIFO
#endif

/* The stat macros for Amdahl UTS, Unisoft System V/88 (and derivatives
like UTekV) are broken, sometimes giving false positives. Undefine
them here and let the code below set them to proper values.
Expand Down
4 changes: 3 additions & 1 deletion pod/perlport.pod
Original file line number Diff line number Diff line change
Expand Up @@ -1600,9 +1600,11 @@ C<-x>, C<-o>. (S<Mac OS>, Win32, VMS, S<RISC OS>)
C<-b>, C<-c>, C<-k>, C<-g>, C<-p>, C<-u>, C<-A> are not implemented.
(S<Mac OS>)

C<-g>, C<-k>, C<-l>, C<-p>, C<-u>, C<-A> are not particularly meaningful.
C<-g>, C<-k>, C<-l>, C<-u>, C<-A> are not particularly meaningful.
(Win32, VMS, S<RISC OS>)

C<-p> is not particularly meaningful. (VMS, S<RISC OS>)

C<-d> is true if passed a device spec without an explicit directory.
(VMS)

Expand Down

0 comments on commit 287a962

Please sign in to comment.