Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread_pthread.h fixes for AIX #62456

Closed
DavidEdelsohn mannequin opened this issue Jun 18, 2013 · 3 comments
Closed

thread_pthread.h fixes for AIX #62456

DavidEdelsohn mannequin opened this issue Jun 18, 2013 · 3 comments
Labels
build The build process and cross-build

Comments

@DavidEdelsohn
Copy link
Mannequin

DavidEdelsohn mannequin commented Jun 18, 2013

BPO 18256
Nosy @pitrou

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2013-06-18.20:23:39.182>
created_at = <Date 2013-06-18.13:58:41.308>
labels = ['build']
title = 'thread_pthread.h fixes for AIX'
updated_at = <Date 2013-06-18.20:23:39.178>
user = 'https://bugs.python.org/DavidEdelsohn'

bugs.python.org fields:

activity = <Date 2013-06-18.20:23:39.178>
actor = 'pitrou'
assignee = 'none'
closed = True
closed_date = <Date 2013-06-18.20:23:39.182>
closer = 'pitrou'
components = ['Build']
creation = <Date 2013-06-18.13:58:41.308>
creator = 'David.Edelsohn'
dependencies = []
files = []
hgrepos = []
issue_num = 18256
keywords = []
message_count = 3.0
messages = ['191410', '191430', '191431']
nosy_count = 3.0
nosy_names = ['pitrou', 'python-dev', 'David.Edelsohn']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue18256'
versions = ['Python 2.7', 'Python 3.3', 'Python 3.4']

@DavidEdelsohn
Copy link
Mannequin Author

DavidEdelsohn mannequin commented Jun 18, 2013

Recent releases of AIX do not need to call pthread_init(). The function is provided in libpthread.a for backward compatibility, but not declared in any header. This patch adds a declaration, or it can be removed completely because AIX 4.x no longer is supported.

The patch also adds uses of "error" to two functions to silence warnings, in a similar manner to other functions in the file.

diff -r f6f70f1ab124 Python/thread_pthread.h
--- a/Python/thread_pthread.h   Mon Jun 17 22:02:14 2013 +0200
+++ b/Python/thread_pthread.h   Tue Jun 18 11:54:50 2013 -0700
@@ -170,6 +170,7 @@
 PyThread__init_thread(void)
 {
 #if defined(_AIX) && defined(__GNUC__)
+    extern void pthread_init(void);
     pthread_init();
 #endif
 }
@@ -444,6 +445,7 @@
     pthread_lock *thelock = (pthread_lock *)lock;
     int status, error = 0;
 
+    (void) error; /* silence unused-but-set-variable warning */
     dprintf(("PyThread_free_lock(%p) called\n", lock));
 
     /* some pthread-like implementations tie the mutex to the cond
@@ -530,6 +532,7 @@
     pthread_lock *thelock = (pthread_lock *)lock;
     int status, error = 0;
 
+    (void) error; /* silence unused-but-set-variable warning */
     dprintf(("PyThread_release_lock(%p) called\n", lock));
 
     status = pthread_mutex_lock( &thelock->mut );

@DavidEdelsohn DavidEdelsohn mannequin added build The build process and cross-build labels Jun 18, 2013
@python-dev
Copy link
Mannequin

python-dev mannequin commented Jun 18, 2013

New changeset f2e373ddfa00 by Antoine Pitrou in branch '3.3':
Issue bpo-18256: Compilation fix for recent AIX releases. Patch by David Edelsohn.
http://hg.python.org/cpython/rev/f2e373ddfa00

New changeset 7081859c1e20 by Antoine Pitrou in branch 'default':
Issue bpo-18256: Compilation fix for recent AIX releases. Patch by David Edelsohn.
http://hg.python.org/cpython/rev/7081859c1e20

New changeset a5ef439f3c9e by Antoine Pitrou in branch '2.7':
Issue bpo-18256: Compilation fix for recent AIX releases. Patch by David Edelsohn.
http://hg.python.org/cpython/rev/a5ef439f3c9e

@pitrou
Copy link
Member

pitrou commented Jun 18, 2013

Fixed, thank you!

@pitrou pitrou closed this as completed Jun 18, 2013
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build
Projects
None yet
Development

No branches or pull requests

1 participant