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
60a5d729
Commit
60a5d729
authored
Oct 16, 2002
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #623780: Replace obsolete struct macros.
parent
98ef20d5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
34 deletions
+14
-34
Modules/posixmodule.c
Modules/posixmodule.c
+9
-9
Modules/timemodule.c
Modules/timemodule.c
+2
-2
configure
configure
+1
-13
configure.in
configure.in
+2
-2
pyconfig.h.in
pyconfig.h.in
+0
-8
No files found.
Modules/posixmodule.c
View file @
60a5d729
...
@@ -685,31 +685,31 @@ static PyStructSequence_Field stat_result_fields[] = {
...
@@ -685,31 +685,31 @@ static PyStructSequence_Field stat_result_fields[] = {
{
"st_atime"
,
"time of last access"
},
{
"st_atime"
,
"time of last access"
},
{
"st_mtime"
,
"time of last modification"
},
{
"st_mtime"
,
"time of last modification"
},
{
"st_ctime"
,
"time of last change"
},
{
"st_ctime"
,
"time of last change"
},
#ifdef HAVE_ST_BLKSIZE
#ifdef HAVE_ST
RUCT_STAT_ST
_BLKSIZE
{
"st_blksize"
,
"blocksize for filesystem I/O"
},
{
"st_blksize"
,
"blocksize for filesystem I/O"
},
#endif
#endif
#ifdef HAVE_ST_BLOCKS
#ifdef HAVE_ST
RUCT_STAT_ST
_BLOCKS
{
"st_blocks"
,
"number of blocks allocated"
},
{
"st_blocks"
,
"number of blocks allocated"
},
#endif
#endif
#ifdef HAVE_ST_RDEV
#ifdef HAVE_ST
RUCT_STAT_ST
_RDEV
{
"st_rdev"
,
"device type (if inode device)"
},
{
"st_rdev"
,
"device type (if inode device)"
},
#endif
#endif
{
0
}
{
0
}
};
};
#ifdef HAVE_ST_BLKSIZE
#ifdef HAVE_ST
RUCT_STAT_ST
_BLKSIZE
#define ST_BLKSIZE_IDX 13
#define ST_BLKSIZE_IDX 13
#else
#else
#define ST_BLKSIZE_IDX 12
#define ST_BLKSIZE_IDX 12
#endif
#endif
#ifdef HAVE_ST_BLOCKS
#ifdef HAVE_ST
RUCT_STAT_ST
_BLOCKS
#define ST_BLOCKS_IDX (ST_BLKSIZE_IDX+1)
#define ST_BLOCKS_IDX (ST_BLKSIZE_IDX+1)
#else
#else
#define ST_BLOCKS_IDX ST_BLKSIZE_IDX
#define ST_BLOCKS_IDX ST_BLKSIZE_IDX
#endif
#endif
#ifdef HAVE_ST_RDEV
#ifdef HAVE_ST
RUCT_STAT_ST
_RDEV
#define ST_RDEV_IDX (ST_BLOCKS_IDX+1)
#define ST_RDEV_IDX (ST_BLOCKS_IDX+1)
#else
#else
#define ST_RDEV_IDX ST_BLOCKS_IDX
#define ST_RDEV_IDX ST_BLOCKS_IDX
...
@@ -866,15 +866,15 @@ _pystat_fromstructstat(STRUCT_STAT st)
...
@@ -866,15 +866,15 @@ _pystat_fromstructstat(STRUCT_STAT st)
fill_time
(
v
,
8
,
st
.
st_mtime
,
mnsec
);
fill_time
(
v
,
8
,
st
.
st_mtime
,
mnsec
);
fill_time
(
v
,
9
,
st
.
st_ctime
,
cnsec
);
fill_time
(
v
,
9
,
st
.
st_ctime
,
cnsec
);
#ifdef HAVE_ST_BLKSIZE
#ifdef HAVE_ST
RUCT_STAT_ST
_BLKSIZE
PyStructSequence_SET_ITEM
(
v
,
ST_BLKSIZE_IDX
,
PyStructSequence_SET_ITEM
(
v
,
ST_BLKSIZE_IDX
,
PyInt_FromLong
((
long
)
st
.
st_blksize
));
PyInt_FromLong
((
long
)
st
.
st_blksize
));
#endif
#endif
#ifdef HAVE_ST_BLOCKS
#ifdef HAVE_ST
RUCT_STAT_ST
_BLOCKS
PyStructSequence_SET_ITEM
(
v
,
ST_BLOCKS_IDX
,
PyStructSequence_SET_ITEM
(
v
,
ST_BLOCKS_IDX
,
PyInt_FromLong
((
long
)
st
.
st_blocks
));
PyInt_FromLong
((
long
)
st
.
st_blocks
));
#endif
#endif
#ifdef HAVE_ST_RDEV
#ifdef HAVE_ST
RUCT_STAT_ST
_RDEV
PyStructSequence_SET_ITEM
(
v
,
ST_RDEV_IDX
,
PyStructSequence_SET_ITEM
(
v
,
ST_RDEV_IDX
,
PyInt_FromLong
((
long
)
st
.
st_rdev
));
PyInt_FromLong
((
long
)
st
.
st_rdev
));
#endif
#endif
...
...
Modules/timemodule.c
View file @
60a5d729
...
@@ -653,7 +653,7 @@ inittime(void)
...
@@ -653,7 +653,7 @@ inittime(void)
PyModule_AddObject
(
m
,
"tzname"
,
PyModule_AddObject
(
m
,
"tzname"
,
Py_BuildValue
(
"(zz)"
,
tzname
[
0
],
tzname
[
1
]));
Py_BuildValue
(
"(zz)"
,
tzname
[
0
],
tzname
[
1
]));
#else
/* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/
#else
/* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/
#ifdef HAVE_TM_ZONE
#ifdef HAVE_
STRUCT_TM_
TM_ZONE
{
{
#define YEAR ((time_t)((365 * 24 + 6) * 3600))
#define YEAR ((time_t)((365 * 24 + 6) * 3600))
time_t
t
;
time_t
t
;
...
@@ -702,7 +702,7 @@ inittime(void)
...
@@ -702,7 +702,7 @@ inittime(void)
PyModule_AddIntConstant
(
m
,
"daylight"
,
0
);
PyModule_AddIntConstant
(
m
,
"daylight"
,
0
);
PyModule_AddObject
(
m
,
"tzname"
,
Py_BuildValue
(
"(zz)"
,
""
,
""
));
PyModule_AddObject
(
m
,
"tzname"
,
Py_BuildValue
(
"(zz)"
,
""
,
""
));
#endif
/* macintosh */
#endif
/* macintosh */
#endif
/* HAVE_TM_ZONE */
#endif
/* HAVE_
STRUCT_TM_
TM_ZONE */
#ifdef __CYGWIN__
#ifdef __CYGWIN__
tzset
();
tzset
();
PyModule_AddIntConstant
(
m
,
"timezone"
,
_timezone
);
PyModule_AddIntConstant
(
m
,
"timezone"
,
_timezone
);
...
...
configure
View file @
60a5d729
#! /bin/sh
#! /bin/sh
# From configure.in Revision: 1.35
6
.
# From configure.in Revision: 1.35
7
.
# Guess values for system-dependent variables and create Makefiles.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53.
# Generated by GNU Autoconf 2.53.
#
#
...
@@ -13333,7 +13333,6 @@ _ACEOF
...
@@ -13333,7 +13333,6 @@ _ACEOF
fi
fi
fi
fi
echo
"
$as_me
:
$LINENO
: checking for struct stat.st_rdev"
>
&5
echo
"
$as_me
:
$LINENO
: checking for struct stat.st_rdev"
>
&5
echo
$ECHO_N
"checking for struct stat.st_rdev...
$ECHO_C
"
>
&6
echo
$ECHO_N
"checking for struct stat.st_rdev...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_member_struct_stat_st_rdev
+set
}
"
=
set
;
then
if
test
"
${
ac_cv_member_struct_stat_st_rdev
+set
}
"
=
set
;
then
...
@@ -13388,14 +13387,8 @@ cat >>confdefs.h <<_ACEOF
...
@@ -13388,14 +13387,8 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
_ACEOF
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_ST_RDEV 1
_ACEOF
fi
fi
echo
"
$as_me
:
$LINENO
: checking for struct stat.st_blksize"
>
&5
echo
"
$as_me
:
$LINENO
: checking for struct stat.st_blksize"
>
&5
echo
$ECHO_N
"checking for struct stat.st_blksize...
$ECHO_C
"
>
&6
echo
$ECHO_N
"checking for struct stat.st_blksize...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_member_struct_stat_st_blksize
+set
}
"
=
set
;
then
if
test
"
${
ac_cv_member_struct_stat_st_blksize
+set
}
"
=
set
;
then
...
@@ -13450,13 +13443,8 @@ cat >>confdefs.h <<_ACEOF
...
@@ -13450,13 +13443,8 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
_ACEOF
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_ST_BLKSIZE 1
_ACEOF
fi
fi
echo
"
$as_me
:
$LINENO
: checking for struct stat.st_blocks"
>
&5
echo
"
$as_me
:
$LINENO
: checking for struct stat.st_blocks"
>
&5
echo
$ECHO_N
"checking for struct stat.st_blocks...
$ECHO_C
"
>
&6
echo
$ECHO_N
"checking for struct stat.st_blocks...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_member_struct_stat_st_blocks
+set
}
"
=
set
;
then
if
test
"
${
ac_cv_member_struct_stat_st_blocks
+set
}
"
=
set
;
then
...
...
configure.in
View file @
60a5d729
...
@@ -1860,8 +1860,8 @@ AC_CHECK_FUNCS(getnameinfo)
...
@@ -1860,8 +1860,8 @@ AC_CHECK_FUNCS(getnameinfo)
AC_HEADER_TIME
AC_HEADER_TIME
AC_STRUCT_TM
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
AC_STRUCT_TIMEZONE
AC_
STRUCT_ST_RDEV
AC_
CHECK_MEMBERS([struct stat.st_rdev])
AC_
STRUCT_ST_BLKSIZE
AC_
CHECK_MEMBERS([struct stat.st_blksize])
AC_STRUCT_ST_BLOCKS
AC_STRUCT_ST_BLOCKS
AC_MSG_CHECKING(for time.h that defines altzone)
AC_MSG_CHECKING(for time.h that defines altzone)
...
...
pyconfig.h.in
View file @
60a5d729
...
@@ -440,18 +440,10 @@
...
@@ -440,18 +440,10 @@
/* Define to 1 if `tm_zone' is member of `struct tm'. */
/* Define to 1 if `tm_zone' is member of `struct tm'. */
#undef HAVE_STRUCT_TM_TM_ZONE
#undef HAVE_STRUCT_TM_TM_ZONE
/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use
`HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */
#undef HAVE_ST_BLKSIZE
/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
`HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
`HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
#undef HAVE_ST_BLOCKS
#undef HAVE_ST_BLOCKS
/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use
`HAVE_STRUCT_STAT_ST_RDEV' instead. */
#undef HAVE_ST_RDEV
/* Define to 1 if you have the `symlink' function. */
/* Define to 1 if you have the `symlink' function. */
#undef HAVE_SYMLINK
#undef HAVE_SYMLINK
...
...
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