Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 22479 - Syntax error in macro for pthread_cleanup_push -- pthread.h
Summary: Syntax error in macro for pthread_cleanup_push -- pthread.h
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Stefan Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-09 03:38 UTC by Joshua Moore-Oliva
Modified: 2003-06-11 01:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Moore-Oliva 2003-06-09 03:38:25 UTC
There is an error in the macro for pthread_cleanup_push. 
 
Right now it is 
 
#define pthread_cleanup_push(routine,arg) \ 
  { struct _pthread_cleanup_buffer _buffer;                                   \ 
    _pthread_cleanup_push (&_buffer, (routine), (arg)); 
 
while it should be 
 
#define pthread_cleanup_push(routine,arg) \ 
  { struct _pthread_cleanup_buffer _buffer;                                   \ 
    _pthread_cleanup_push (&_buffer, (routine), (arg)); } 
 
 
Note that it is currently missing a closing }
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-09 07:26:52 UTC
this is in what package?
Comment 2 Joshua Moore-Oliva 2003-06-09 08:09:17 UTC
I have no idea what package holds the headers for the system, I only know that my gentoo box 
has that problem on it and I've never touched the system headers before. 
 
Josh. 
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-09 08:30:22 UTC
what version of glibc do you have installed?  can you please paste the output of emerge info
Comment 4 Joshua Moore-Oliva 2003-06-09 08:53:28 UTC
*  sys-libs/glibc 
      Latest version available: 2.3.1-r4 
      Latest version installed: 2.3.1-r4 
      Size of downloaded files: 17,701 kB 
      Homepage:    http://www.gnu.org/software/libc/libc.html 
      Description: GNU libc6 (also called glibc2) C library 
 
Comment 5 Stefan Jones (RETIRED) gentoo-dev 2003-06-11 01:39:21 UTC
This is not a bug, it is intentional feature of the header files, read the comments in pthread.h:

  pthread_cleanup_push and pthread_cleanup_pop are macros and must always
   be used in matching pairs at the same nesting level of braces.

Thus pthread_cleanup_push opens a brace and pthread_cleanup_pop closes the brace,

closing bug