Skip to content

Commit 138477b

Browse files
QuzarDCQuzarDC
authored andcommitted
Add missing DECLS to pthreads and sys headers.
1 parent f6f303f commit 138477b

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

addons/libpthread/pthread-internal.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
#ifndef __PTHREAD_INTERNAL_H
88
#define __PTHREAD_INTERNAL_H
99

10+
#include <sys/cdefs.h>
11+
__BEGIN_DECLS
12+
1013
#define __PTHREAD_HAVE_ATTR_TYPE 1
1114
#define __PTHREAD_HAVE_MUTEX_TYPE 1
1215
#define __PTHREAD_HAVE_COND_TYPE 1
@@ -81,4 +84,6 @@ STATIC_ASSERT(__PTHREAD_BARRIER_SIZE == THD_BARRIER_SIZE)
8184

8285
#undef STATIC_ASSERT
8386

87+
__END_DECLS
88+
8489
#endif /* !__PTHREAD_INTERNAL_H */

include/sys/_pthreadtypes.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
#ifndef __SYS_PTHREADTYPES_H
99
#define __SYS_PTHREADTYPES_H
1010

11+
#include <sys/cdefs.h>
12+
__BEGIN_DECLS
13+
1114
typedef unsigned long int pthread_t;
1215

1316
typedef struct pthread_mutexattr_t {
@@ -100,4 +103,6 @@ typedef union pthread_barrier_t {
100103
#undef __PTHREAD_BARRIER_SIZE
101104
#endif /* !__PTHREAD_HAVE_BARRIER_TYPE */
102105

106+
__END_DECLS
107+
103108
#endif /* !__SYS_PTHREADTYPES_H */

include/sys/lock.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
#ifndef __SYS_LOCK_H__
2020
#define __SYS_LOCK_H__
2121

22+
#include <sys/cdefs.h>
23+
__BEGIN_DECLS
24+
2225
/** \cond */
2326

2427
typedef struct {
@@ -63,4 +66,6 @@ void __newlib_lock_release_recursive(__newlib_recursive_lock_t*);
6366

6467
/** \endcond */
6568

69+
__END_DECLS
70+
6671
#endif /* __SYS_LOCK_H__ */

include/sys/stdio.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
#ifndef _NEWLIB_STDIO_H
99
#define _NEWLIB_STDIO_H
1010

11+
#include <sys/cdefs.h>
12+
__BEGIN_DECLS
13+
1114
// Cribbed from newlib sys/stdio.h
1215

1316
/* Internal locking macros, used to protect stdio functions. In the
@@ -31,4 +34,6 @@
3134
#include <stdarg.h>
3235
#include <kos/fs.h>
3336

37+
__END_DECLS
38+
3439
#endif /* _NEWLIB_STDIO_H */

0 commit comments

Comments
 (0)