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
a6e97580
Commit
a6e97580
authored
Jan 01, 2002
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #497098: build support for GNU/Hurd.
parent
65293680
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
341 additions
and
254 deletions
+341
-254
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+2
-0
Python/thread_cthread.h
Python/thread_cthread.h
+15
-3
acconfig.h
acconfig.h
+9
-0
configure
configure
+295
-244
configure.in
configure.in
+10
-4
pyconfig.h.in
pyconfig.h.in
+9
-3
No files found.
Misc/ACKS
View file @
a6e97580
...
...
@@ -301,6 +301,7 @@ Dom Mitchell
Doug Moen
The Dragon De Monsyne
Skip Montanaro
James A Morrison
Sape Mullender
Sjoerd Mullender
Michael Muller
...
...
Misc/NEWS
View file @
a6e97580
...
...
@@ -30,6 +30,8 @@ C API
New platforms
- GNU/Hurd is now supported.
Tests
Windows
...
...
Python/thread_cthread.h
View file @
a6e97580
#ifdef MACH_C_THREADS
#include <mach/cthreads.h>
#endif
#ifdef HURD_C_THREADS
#include <cthreads.h>
#endif
/*
* Initialization.
...
...
@@ -8,7 +13,14 @@
static
void
PyThread__init_thread
(
void
)
{
cthread_init
();
#ifndef HURD_C_THREADS
/* Roland McGrath said this should not be used since this is
done while linking to threads */
cthread_init
();
#else
/* do nothing */
;
#endif
}
/*
...
...
@@ -127,10 +139,10 @@ PyThread_acquire_lock(PyThread_type_lock lock, int waitflag)
dprintf
((
"PyThread_acquire_lock(%p, %d) called
\n
"
,
lock
,
waitflag
));
if
(
waitflag
)
{
/* blocking */
mutex_lock
(
lock
);
mutex_lock
(
(
mutex_t
)
lock
);
success
=
TRUE
;
}
else
{
/* non blocking */
success
=
mutex_try_lock
(
lock
);
success
=
mutex_try_lock
(
(
mutex_t
)
lock
);
}
dprintf
((
"PyThread_acquire_lock(%p, %d) -> %d
\n
"
,
lock
,
waitflag
,
success
));
return
success
;
...
...
acconfig.h
View file @
a6e97580
...
...
@@ -19,6 +19,12 @@
/* Define if you have the Mach cthreads package */
#undef C_THREADS
/* Define if you are using Mach cthreads under mach / */
#undef MACH_C_THREADS
/* Define if you are using Mach cthreads directly under /include */
#undef HURD_C_THREADS
/* Define to `long' if <time.h> doesn't define. */
#undef clock_t
...
...
@@ -47,6 +53,9 @@
/* struct addrinfo (netdb.h) */
#undef HAVE_ADDRINFO
/* Define if you have the getaddrinfo function. */
#undef HAVE_GETADDRINFO
/* struct sockaddr_storage (sys/socket.h) */
#undef HAVE_SOCKADDR_STORAGE
...
...
configure
View file @
a6e97580
This diff is collapsed.
Click to expand it.
configure.in
View file @
a6e97580
...
...
@@ -796,7 +796,7 @@ then
# No framework. Ignore undefined symbols, assuming they come from Python
LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
fi ;;
Linux*) LDSHARED="gcc -shared";;
Linux*
|GNU*
) LDSHARED="gcc -shared";;
dgux*) LDSHARED="ld -G";;
BSD/OS*/4*) LDSHARED="gcc -shared";;
OpenBSD*|NetBSD*|FreeBSD*)
...
...
@@ -832,7 +832,7 @@ then
then CCSHARED="-fPIC";
else CCSHARED="+z";
fi;;
Linux*) CCSHARED="-fPIC";;
Linux*
|GNU*
) CCSHARED="-fPIC";;
BSD/OS*/4*) CCSHARED="-fpic";;
FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*)
...
...
@@ -860,7 +860,7 @@ then
hp*|HP*)
LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Linux*
|GNU*
) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys
Darwin/*)
# -u __dummy makes the linker aware of the objc runtime
...
...
@@ -1033,8 +1033,14 @@ else
AC_MSG_RESULT($unistd_defines_pthreads)
AC_DEFINE(_REENTRANT)
AC_CHECK_HEADER(cthreads.h, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(C_THREADS)
AC_DEFINE(HURD_C_THREADS)
LIBS="$LIBS -lthreads"
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(C_THREADS)
AC_DEFINE(MACH_C_THREADS)
LIBOBJS="$LIBOBJS thread.o"],[
AC_MSG_CHECKING(for --with-pth)
AC_ARG_WITH(pth,
...
...
@@ -1088,7 +1094,7 @@ pthread_create (NULL, NULL, start_routine, NULL)], [
LIBS="$LIBS -lcma"
LIBOBJS="$LIBOBJS thread.o"],[
USE_THREAD_MODULE="#"])
])])])])])])])])])
])])])])])])])])])
])
if test "$posix_threads" = "yes"; then
if test "$unistd_defines_pthreads" = "no"; then
...
...
pyconfig.h.in
View file @
a6e97580
...
...
@@ -93,6 +93,12 @@
/* Define if you have the Mach cthreads package */
#undef C_THREADS
/* Define if you are using Mach cthreads under mach / */
#undef MACH_C_THREADS
/* Define if you are using Mach cthreads directly under /include */
#undef HURD_C_THREADS
/* Define to `long' if <time.h> doesn't define. */
#undef clock_t
...
...
@@ -121,6 +127,9 @@
/* struct addrinfo (netdb.h) */
#undef HAVE_ADDRINFO
/* Define if you have the getaddrinfo function. */
#undef HAVE_GETADDRINFO
/* struct sockaddr_storage (sys/socket.h) */
#undef HAVE_SOCKADDR_STORAGE
...
...
@@ -402,9 +411,6 @@
/* Define if you have the gai_strerror function. */
#undef HAVE_GAI_STRERROR
/* Define if you have the getaddrinfo function. */
#undef HAVE_GETADDRINFO
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
...
...
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