Ensure names are not mangled when used with C++
This commit is contained in:
parent
fb1d1697f1
commit
ae61eef10a
@ -1,6 +1,10 @@
|
||||
#ifndef ARGPARSE_H
|
||||
#define ARGPARSE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "aliases.h"
|
||||
#include <linux/limits.h>
|
||||
#include <stdbool.h>
|
||||
@ -17,4 +21,8 @@ typedef struct {
|
||||
|
||||
argparser_t parse_args(i32 argc, char *argv[]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // !ARGPARSE_H
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef D_ARR_H
|
||||
#define D_ARR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "aliases.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -13,4 +17,8 @@ i64 darr_add(darr_t **darr, void *item);
|
||||
void **darr_get_items(darr_t *darr);
|
||||
void darr_free(darr_t **darr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // !D_ARR_H
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef IO_H
|
||||
#define IO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "aliases.h"
|
||||
#include <linux/limits.h>
|
||||
#include <stdbool.h>
|
||||
@ -21,4 +25,8 @@ u64 get_file_length(FILE *fp);
|
||||
void read_entire_file(void *dst, FILE *fp);
|
||||
dirwalk_result_t walk_dir(dirwalk_t **dirwalk, const char *filepath);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // !IO_H
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef PAK_H
|
||||
#define PAK_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "aliases.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -45,4 +49,8 @@ buf_t *read_file_from_pack(asset_pack_t *pack, const char *filename);
|
||||
void close_pack_file(buf_t **buf);
|
||||
void close_asset_pack(asset_pack_t **pack);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // !PAK_H
|
||||
|
@ -1,8 +1,16 @@
|
||||
#ifndef PCKR_H
|
||||
#define PCKR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "aliases.h"
|
||||
|
||||
i32 run_pckr(i32 argc, char *argv[]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // !PCKR_H
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef TEST_UTILS_H
|
||||
#define TEST_UTILS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#define ARRLEN(ARR) (sizeof ARR / sizeof ARR[0])
|
||||
|
||||
typedef struct {
|
||||
@ -8,4 +12,8 @@ typedef struct {
|
||||
const char *contents;
|
||||
} asset_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // !TEST_UTILS_H
|
||||
|
Loading…
Reference in New Issue
Block a user