Added missing extern "C"

This commit is contained in:
Xavi Del Campo 2020-02-01 00:51:53 +01:00
parent 5f638ea86c
commit 805fc37a06
7 changed files with 79 additions and 18 deletions

View File

@ -5,6 +5,11 @@
#ifndef _PSXBIOS_H
#define _PSXBIOS_H
#ifdef __cplusplus
extern "C"
{
#endif
/* Joypad functions */
extern void PAD_init(unsigned long mode, unsigned long *pad_buf);
@ -212,4 +217,8 @@ int WaitEvent(unsigned int event);
void LoadExec(char *name, int argc, char **argv);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,6 +1,13 @@
#ifndef _PSXGPU_H
#define _PSXGPU_H
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdarg.h>
#define GPU_DATA_PORT_ADDR 0x1f801810
#define GPU_CONTROL_PORT_ADDR 0x1f801814
#define GPU_DATA_PORT *((volatile unsigned int*)GPU_DATA_PORT_ADDR)
@ -13,8 +20,6 @@
#define get_clutid(cx, cy) (((cx&0x3ff)>>4)|((cy&0x1ff)<<6))
#include <stdarg.h>
/**
* Initializes the GPU. Same as GsInitEx(0)
*
@ -1139,6 +1144,10 @@ void GsSortPolyLine(GsPolyLine *line);
void GsSortGPolyLine(GsGPolyLine *line);
#ifdef __cplusplus
}
#endif
//void GsSortSimpleMap(GsMap *map);
#endif

View File

@ -1,6 +1,11 @@
#ifndef _SPU_H
#define _SPU_H
#ifdef __cplusplus
extern "C"
{
#endif
#define SPU_ADDR *((volatile unsigned short*)0x1f801da6)
#define SPU_DATA *((volatile unsigned short*)0x1f801da8)
#define SPU_CONTROL *((volatile unsigned short*)0x1f801daa)
@ -222,4 +227,8 @@ void SsEnableExt(void);
void SsCdVol(unsigned short left, unsigned short right);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -20,6 +20,11 @@
#include <stdarg.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
@ -166,5 +171,8 @@ int sio_vprintf(const char *fmt, va_list ap);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@ -9,6 +9,11 @@
#ifndef _STDLIB_H
#define _STDLIB_H
#ifdef __cplusplus
extern "C"
{
#endif
typedef unsigned int size_t;
typedef signed int ssize_t;
@ -62,5 +67,9 @@ void call_atexit_callbacks(void);
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
#ifdef __cplusplus
}
#endif
#endif

View File

@ -12,6 +12,11 @@
#ifndef _STRING_H
#define _STRING_H
#ifdef __cplusplus
extern "C"
{
#endif
#include <strings.h> // for backwards compatibility
#include <types.h>
@ -60,5 +65,8 @@ void *memmem(const void *big, size_t big_len, const void *little, size_t little_
int ffsl(long value);
int ffsll(long long value);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -7,6 +7,11 @@
#ifndef _STRINGS_H
#define _STRINGS_H
#ifdef __cplusplus
extern "C"
{
#endif
#include <string.h>
#include <types.h>
@ -34,4 +39,8 @@ unsigned int popcount64(uint64_t value);
int strcasecmp(const char *s1, const char *s2);
int strncasecmp(const char *s1, const char *s2, size_t len);
#ifdef __cplusplus
}
#endif
#endif