Skip to content
Snippets Groups Projects
Commit b7fc6763 authored by Anders Lindh Olsson's avatar Anders Lindh Olsson :8ball:
Browse files

Fix headerguards and clarify endifs

parent 4665f7c7
No related branches found
No related tags found
1 merge request!85E3-670: Propose linters
#ifndef asprintf_h #pragma once
#define asprintf_h
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif // __cplusplus
#include <stdarg.h> #include <stdarg.h>
#ifndef __GNUC__ #ifndef __GNUC__
#define __attribute__(arg) #define __attribute__(arg)
#endif #endif // __GNUC__
int asprintf(char **pbuffer, const char *format, ...) int asprintf(char **pbuffer, const char *format, ...)
__attribute__((__format__(__printf__, 2, 3))); __attribute__((__format__(__printf__, 2, 3)));
int vasprintf(char **pbuffer, const char *format, va_list ap) int vasprintf(char **pbuffer, const char *format, va_list ap)
__attribute__((__format__(__printf__, 2, 0))); __attribute__((__format__(__printf__, 2, 0)));
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif // __cplusplus
#endif
...@@ -6,13 +6,10 @@ ...@@ -6,13 +6,10 @@
* EPICS BASE is distributed subject to a Software License Agreement found * EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution. * in file LICENSE that is included with this distribution.
\*************************************************************************/ \*************************************************************************/
/* dbLoadTemplate.h */
#ifndef INCdbLoadTemplateh #pragma once
#define INCdbLoadTemplateh
#include "dbCoreAPI.h" #include "dbCoreAPI.h"
DBCORE_API int dbLoadTemplate(const char *sub_file, const char *cmd_collect, DBCORE_API int dbLoadTemplate(const char *sub_file, const char *cmd_collect,
const char *path); const char *path);
#endif /*INCdbLoadTemplateh*/
#ifndef expr_h #pragma once
#define expr_h
#include <stddef.h> #include <stddef.h>
#ifdef __cplusplus #ifdef __cplusplus
extern { extern {
#endif #endif // __cplusplus
extern int exprDebug; extern int exprDebug;
...@@ -20,5 +19,4 @@ extern { ...@@ -20,5 +19,4 @@ extern {
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif // __cplusplus
#endif
#ifndef require_h #pragma once
#define require_h
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif // __cplusplus
#ifndef __GNUC__ #ifndef __GNUC__
#define __attribute__(dummy) #define __attribute__(dummy)
#endif #endif // __GNUC__
int require(const char *libname, const char *version, const char *args); int require(const char *libname, const char *version, const char *args);
size_t foreachLoadedLib(size_t (*func)(const char *name, const char *version, size_t foreachLoadedLib(size_t (*func)(const char *name, const char *version,
...@@ -23,6 +22,4 @@ void pathAdd(const char *varname, const char *dirname); ...@@ -23,6 +22,4 @@ void pathAdd(const char *varname, const char *dirname);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif // __cplusplus
#endif
#ifndef strdup_h #pragma once
#define strdup_h
#include <stddef.h> #include <stddef.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif // __cplusplus
char *strdup(const char *s); char *strdup(const char *s);
char *strndup(const char *s, size_t n); char *strndup(const char *s, size_t n);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif // __cplusplus
#endif
#pragma once
typedef struct semver_t { typedef struct semver_t {
char *version_str; char *version_str;
int major; int major;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment