Commit 5a1b4a63 authored by Mark Dickinson's avatar Mark Dickinson

Merged revisions 76813 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76813 | mark.dickinson | 2009-12-13 21:06:06 +0000 (Sun, 13 Dec 2009) | 3 lines

  Issue #7492: Autoconf tests were leaving semaphore files behind.  Add
  sem_unlink calls to delete those semaphore files.
........
parent 6ec3726c
#! /bin/sh #! /bin/sh
# From configure.in Revision: 76645 . # From configure.in Revision: 76779 .
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 3.2. # Generated by GNU Autoconf 2.61 for python 3.2.
# #
...@@ -23782,6 +23782,7 @@ int main(void) { ...@@ -23782,6 +23782,7 @@ int main(void) {
return 1; return 1;
} }
sem_close(a); sem_close(a);
sem_unlink("/autoconf");
return 0; return 0;
} }
...@@ -23856,7 +23857,7 @@ cat >>conftest.$ac_ext <<_ACEOF ...@@ -23856,7 +23857,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <sys/stat.h> #include <sys/stat.h>
int main(void){ int main(void){
sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0); sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
int count; int count;
int res; int res;
if(a==SEM_FAILED){ if(a==SEM_FAILED){
...@@ -23866,6 +23867,7 @@ int main(void){ ...@@ -23866,6 +23867,7 @@ int main(void){
} }
res = sem_getvalue(a, &count); res = sem_getvalue(a, &count);
sem_close(a); sem_close(a);
sem_unlink("/autocftw");
return res==-1 ? 1 : 0; return res==-1 ? 1 : 0;
} }
......
...@@ -3324,6 +3324,7 @@ int main(void) { ...@@ -3324,6 +3324,7 @@ int main(void) {
return 1; return 1;
} }
sem_close(a); sem_close(a);
sem_unlink("/autoconf");
return 0; return 0;
} }
], ac_cv_posix_semaphores_enabled=yes, ], ac_cv_posix_semaphores_enabled=yes,
...@@ -3348,7 +3349,7 @@ AC_TRY_RUN([ ...@@ -3348,7 +3349,7 @@ AC_TRY_RUN([
#include <sys/stat.h> #include <sys/stat.h>
int main(void){ int main(void){
sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0); sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
int count; int count;
int res; int res;
if(a==SEM_FAILED){ if(a==SEM_FAILED){
...@@ -3358,6 +3359,7 @@ int main(void){ ...@@ -3358,6 +3359,7 @@ int main(void){
} }
res = sem_getvalue(a, &count); res = sem_getvalue(a, &count);
sem_close(a); sem_close(a);
sem_unlink("/autocftw");
return res==-1 ? 1 : 0; return res==-1 ? 1 : 0;
} }
], ac_cv_broken_sem_getvalue=no, ], ac_cv_broken_sem_getvalue=no,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment