Fix name mangling when using a C++ compiler (#7)
This commit is contained in:
parent
52b1a0f80d
commit
0c6cec978c
@ -36,6 +36,10 @@
|
|||||||
#ifndef _FREERTOS_POSIX_ERRNO_H_
|
#ifndef _FREERTOS_POSIX_ERRNO_H_
|
||||||
#define _FREERTOS_POSIX_ERRNO_H_
|
#define _FREERTOS_POSIX_ERRNO_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Undefine all errnos to avoid redefinition errors with system errnos. */
|
/* Undefine all errnos to avoid redefinition errors with system errnos. */
|
||||||
#undef EPERM
|
#undef EPERM
|
||||||
#undef ENOENT
|
#undef ENOENT
|
||||||
@ -92,4 +96,8 @@
|
|||||||
#endif
|
#endif
|
||||||
/**@} */
|
/**@} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ifndef _FREERTOS_POSIX_ERRNO_H_ */
|
#endif /* ifndef _FREERTOS_POSIX_ERRNO_H_ */
|
||||||
|
@ -33,6 +33,10 @@
|
|||||||
#ifndef _FREERTOS_POSIX_FCNTL_H_
|
#ifndef _FREERTOS_POSIX_FCNTL_H_
|
||||||
#define _FREERTOS_POSIX_FCNTL_H_
|
#define _FREERTOS_POSIX_FCNTL_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name File creation flags for use in the oflag value to open() and openat().
|
* @name File creation flags for use in the oflag value to open() and openat().
|
||||||
*/
|
*/
|
||||||
@ -76,4 +80,8 @@
|
|||||||
#define O_WRONLY 0x8000 /**< Open for writing only. */
|
#define O_WRONLY 0x8000 /**< Open for writing only. */
|
||||||
/**@} */
|
/**@} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ifndef _FREERTOS_POSIX_FCNTL_H_ */
|
#endif /* ifndef _FREERTOS_POSIX_FCNTL_H_ */
|
||||||
|
@ -33,6 +33,10 @@
|
|||||||
#ifndef _FREERTOS_POSIX_MQUEUE_H_
|
#ifndef _FREERTOS_POSIX_MQUEUE_H_
|
||||||
#define _FREERTOS_POSIX_MQUEUE_H_
|
#define _FREERTOS_POSIX_MQUEUE_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* FreeRTOS+POSIX includes. */
|
/* FreeRTOS+POSIX includes. */
|
||||||
#include "FreeRTOS_POSIX/time.h"
|
#include "FreeRTOS_POSIX/time.h"
|
||||||
|
|
||||||
@ -247,4 +251,8 @@ int mq_timedsend( mqd_t mqdes,
|
|||||||
*/
|
*/
|
||||||
int mq_unlink( const char * name );
|
int mq_unlink( const char * name );
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ifndef _FREERTOS_POSIX_MQUEUE_H_ */
|
#endif /* ifndef _FREERTOS_POSIX_MQUEUE_H_ */
|
||||||
|
@ -33,6 +33,10 @@
|
|||||||
#ifndef _FREERTOS_POSIX_PTHREAD_H_
|
#ifndef _FREERTOS_POSIX_PTHREAD_H_
|
||||||
#define _FREERTOS_POSIX_PTHREAD_H_
|
#define _FREERTOS_POSIX_PTHREAD_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* FreeRTOS+POSIX includes. POSIX states that this header shall make symbols
|
/* FreeRTOS+POSIX includes. POSIX states that this header shall make symbols
|
||||||
* defined in sched.h and time.h visible. */
|
* defined in sched.h and time.h visible. */
|
||||||
#include "FreeRTOS_POSIX/sched.h"
|
#include "FreeRTOS_POSIX/sched.h"
|
||||||
@ -498,4 +502,8 @@ int pthread_setschedparam( pthread_t thread,
|
|||||||
int policy,
|
int policy,
|
||||||
const struct sched_param * param );
|
const struct sched_param * param );
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _FREERTOS_POSIX_PTHREAD_H_ */
|
#endif /* _FREERTOS_POSIX_PTHREAD_H_ */
|
||||||
|
@ -33,6 +33,10 @@
|
|||||||
#ifndef _FREERTOS_POSIX_SCHED_H_
|
#ifndef _FREERTOS_POSIX_SCHED_H_
|
||||||
#define _FREERTOS_POSIX_SCHED_H_
|
#define _FREERTOS_POSIX_SCHED_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Scheduling Policies
|
* @name Scheduling Policies
|
||||||
*/
|
*/
|
||||||
@ -81,4 +85,8 @@ int sched_get_priority_min( int policy );
|
|||||||
*/
|
*/
|
||||||
int sched_yield( void );
|
int sched_yield( void );
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ifndef _FREERTOS_POSIX_SCHED_H_ */
|
#endif /* ifndef _FREERTOS_POSIX_SCHED_H_ */
|
||||||
|
@ -37,6 +37,10 @@
|
|||||||
#include "FreeRTOS_POSIX/time.h"
|
#include "FreeRTOS_POSIX/time.h"
|
||||||
#include "FreeRTOS_POSIX_types.h"
|
#include "FreeRTOS_POSIX_types.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Semaphore type.
|
* @brief Semaphore type.
|
||||||
*/
|
*/
|
||||||
@ -140,4 +144,8 @@ int sem_trywait( sem_t * sem );
|
|||||||
*/
|
*/
|
||||||
int sem_wait( sem_t * sem );
|
int sem_wait( sem_t * sem );
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ifndef _FREERTOS_POSIX_SEMAPHORE_H_ */
|
#endif /* ifndef _FREERTOS_POSIX_SEMAPHORE_H_ */
|
||||||
|
@ -37,6 +37,10 @@
|
|||||||
#ifndef _FREERTOS_POSIX_SIGNAL_H_
|
#ifndef _FREERTOS_POSIX_SIGNAL_H_
|
||||||
#define _FREERTOS_POSIX_SIGNAL_H_
|
#define _FREERTOS_POSIX_SIGNAL_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Values of sigev_notify.
|
* @name Values of sigev_notify.
|
||||||
*/
|
*/
|
||||||
@ -67,4 +71,8 @@ struct sigevent
|
|||||||
pthread_attr_t * sigev_notify_attributes; /**< Notification attributes. */
|
pthread_attr_t * sigev_notify_attributes; /**< Notification attributes. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ifndef _FREERTOS_POSIX_SIGNAL_H_ */
|
#endif /* ifndef _FREERTOS_POSIX_SIGNAL_H_ */
|
||||||
|
@ -33,6 +33,10 @@
|
|||||||
#ifndef _FREERTOS_POSIX_TYPES_H_
|
#ifndef _FREERTOS_POSIX_TYPES_H_
|
||||||
#define _FREERTOS_POSIX_TYPES_H_
|
#define _FREERTOS_POSIX_TYPES_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* C standard library includes. */
|
/* C standard library includes. */
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
@ -188,4 +192,8 @@ typedef void * pthread_barrierattr_t;
|
|||||||
typedef long int off_t;
|
typedef long int off_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ifndef _FREERTOS_POSIX_TYPES_H_ */
|
#endif /* ifndef _FREERTOS_POSIX_TYPES_H_ */
|
||||||
|
@ -33,6 +33,10 @@
|
|||||||
#ifndef _FREERTOS_POSIX_TIME_H_
|
#ifndef _FREERTOS_POSIX_TIME_H_
|
||||||
#define _FREERTOS_POSIX_TIME_H_
|
#define _FREERTOS_POSIX_TIME_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* FreeRTOS+POSIX includes. */
|
/* FreeRTOS+POSIX includes. */
|
||||||
#include "FreeRTOS_POSIX/sys/types.h"
|
#include "FreeRTOS_POSIX/sys/types.h"
|
||||||
#include "FreeRTOS_POSIX/signal.h"
|
#include "FreeRTOS_POSIX/signal.h"
|
||||||
@ -255,4 +259,8 @@ int timer_settime( timer_t timerid,
|
|||||||
const struct itimerspec * value,
|
const struct itimerspec * value,
|
||||||
struct itimerspec * ovalue );
|
struct itimerspec * ovalue );
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ifndef _FREERTOS_POSIX_TIME_H_ */
|
#endif /* ifndef _FREERTOS_POSIX_TIME_H_ */
|
||||||
|
@ -33,6 +33,10 @@
|
|||||||
#ifndef _FREERTOS_POSIX_UNISTD_H_
|
#ifndef _FREERTOS_POSIX_UNISTD_H_
|
||||||
#define _FREERTOS_POSIX_UNISTD_H_
|
#define _FREERTOS_POSIX_UNISTD_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "FreeRTOS_POSIX/sys/types.h"
|
#include "FreeRTOS_POSIX/sys/types.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,4 +62,8 @@ unsigned sleep( unsigned seconds );
|
|||||||
*/
|
*/
|
||||||
int usleep( useconds_t usec );
|
int usleep( useconds_t usec );
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ifndef _FREERTOS_POSIX_UNISTD_H_ */
|
#endif /* ifndef _FREERTOS_POSIX_UNISTD_H_ */
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
#ifndef _FREERTOS_POSIX_UTILS_
|
#ifndef _FREERTOS_POSIX_UTILS_
|
||||||
#define _FREERTOS_POSIX_UTILS_
|
#define _FREERTOS_POSIX_UTILS_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* C standard library includes. */
|
/* C standard library includes. */
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -152,4 +156,8 @@ int UTILS_TimespecCompare( const struct timespec * const x,
|
|||||||
*/
|
*/
|
||||||
bool UTILS_ValidateTimespec( const struct timespec * const pxTimespec );
|
bool UTILS_ValidateTimespec( const struct timespec * const pxTimespec );
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ifndef _FREERTOS_POSIX_UTILS_ */
|
#endif /* ifndef _FREERTOS_POSIX_UTILS_ */
|
||||||
|
Reference in New Issue
Block a user