Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f9836ba4
Commit
f9836ba4
authored
Aug 08, 2001
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put conditional S_ISDIR definition(s) into pyport.h.
parent
e00dde20
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
Include/pyport.h
Include/pyport.h
+13
-0
Modules/getpath.c
Modules/getpath.c
+0
-9
Python/bltinmodule.c
Python/bltinmodule.c
+1
-1
Python/import.c
Python/import.c
+0
-4
No files found.
Include/pyport.h
View file @
f9836ba4
...
...
@@ -150,6 +150,19 @@ typedef unsigned LONG_LONG Py_uintptr_t;
#include <stat.h>
#endif
#if defined(PYCC_VACPP)
/* VisualAge C/C++ Failed to Define MountType Field in sys/stat.h */
#define S_IFMT (S_IFDIR|S_IFCHR|S_IFREG)
#endif
#ifndef S_ISREG
#define S_ISREG(x) (((x) & S_IFMT) == S_IFREG)
#endif
#ifndef S_ISDIR
#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
#endif
#ifdef __cplusplus
/* Move this down here since some C++ #include's don't like to be included
...
...
Modules/getpath.c
View file @
f9836ba4
...
...
@@ -5,7 +5,6 @@
#include "osdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#if HAVE_UNISTD_H
...
...
@@ -138,14 +137,6 @@ reduce(char *dir)
}
#ifndef S_ISREG
#define S_ISREG(x) (((x) & S_IFMT) == S_IFREG)
#endif
#ifndef S_ISDIR
#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
#endif
static
int
isfile
(
char
*
filename
)
/* Is file, not directory */
{
...
...
Python/bltinmodule.c
View file @
f9836ba4
...
...
@@ -592,7 +592,7 @@ builtin_execfile(PyObject *self, PyObject *args)
exists
=
0
;
/* Test for existence or directory. */
if
(
!
stat
(
filename
,
&
s
))
{
if
(
(
s
.
st_mode
&
S_IFMT
)
==
S_IFDIR
)
if
(
S_ISDIR
(
s
.
st_mode
)
)
errno
=
EISDIR
;
else
exists
=
1
;
...
...
Python/import.c
View file @
f9836ba4
...
...
@@ -28,10 +28,6 @@
#define S_IFMT (S_IFDIR|S_IFCHR|S_IFREG)
#endif
#ifndef S_ISDIR
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
#endif
extern
time_t
PyOS_GetLastModificationTime
(
char
*
,
FILE
*
);
/* In getmtime.c */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment