[PATCH] stdio_lock.h define _IO_acquire_lock, _IO_release_lock

Steven Munroe <[email protected]>
Newsgroups gmane.comp.lib.phil
Organization IBM Linux Developement
Message-ID <[email protected]>
recent changes in glibc depend on _IO_acquire_lock and _IO_release_lock being
defined. But in nptl-56 these definitions are missing from
sysdeps/pthread/bits/stdio-lock.h. Is a nptl update comming?

Also seeing undefined references to pthread_setcancelstate from misc/error.c

2003-09-02  Steven Munroe <[email protected]>

	* sysdeps/pthread/bits/stdio-lock.h [_LIBC && ! NOT_IN_libc]
	(_IO_acquire_lock, _IO_release_lock): Define.


-- 
Steven Munroe
[email protected]
Linux on PowerPC-64 Development
GLIBC for PowerPC-64 Development
nptl-stdio-lock.patch (text/plain, 709 B)
diff -urN nptl-0.56/nptl/sysdeps/pthread/bits/stdio-lock.h libc23/nptl/sysdeps/pthread/bits/stdio-lock.h
--- nptl-0.56/nptl/sysdeps/pthread/bits/stdio-lock.h	2002-12-20 03:02:36.000000000 -0600
+++ libc23/nptl/sysdeps/pthread/bits/stdio-lock.h	2003-09-02 14:14:31.000000000 -0500
@@ -85,5 +85,15 @@
 #define _IO_cleanup_region_end(_doit) \
   __libc_cleanup_region_end (_doit)
 
+#if defined _LIBC && !defined NOT_IN_libc
+# define _IO_acquire_lock(_fp) \
+  _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp));      \
+  _IO_flockfile (_fp)
+
+# define _IO_release_lock(_fp) \
+  _IO_funlockfile (_fp);						      \
+  _IO_cleanup_region_end (0)
+#endif
+
 
 #endif /* bits/stdio-lock.h */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.