Bug 16848

Summary: missing } in pthread.h
Product: [Retired] Red Hat Linux Reporter: Need Real Name <ptomsich>
Component: libcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-09-06 14:43:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2000-08-24 09:16:05 UTC
/usr/include/pthread.h is missing a closing } in pthread_cleanup_push

it reads:
#define
pthread_cleanup_push(routine,arg)                                     \
  { struct _pthread_cleanup_buffer
_buffer;                                   \
    _pthread_cleanup_push (&_buffer, (routine), (arg));

and should read:
#define
pthread_cleanup_push(routine,arg)                                     \
  { struct _pthread_cleanup_buffer
_buffer;                                   \
    _pthread_cleanup_push (&_buffer, (routine), (arg)); }

the absence of this closing } leads to hard to find compile-errors.

--phil.

Comment 1 Jakub Jelinek 2000-09-06 16:46:14 UTC
The compile errors are desirable, quoting pthread.h:
/* Install a cleanup handler: ROUTINE will be called with arguments ARG
   when the thread is cancelled or calls pthread_exit.  ROUTINE will also
   be called with arguments ARG when the matching pthread_cleanup_pop
   is executed with non-zero EXECUTE argument.
   pthread_cleanup_push and pthread_cleanup_pop are macros and must always
   be used in matching pairs at the same nesting level of braces. */