Skip to content

Commit

Permalink
misc: don't violate reserved identifier naming convention.
Browse files Browse the repository at this point in the history
  • Loading branch information
veox committed Apr 3, 2014
1 parent cabb02f commit cc735db
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 25 deletions.
13 changes: 9 additions & 4 deletions adl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef __ADL_H__
#define __ADL_H__
#ifndef ADL_H
#define ADL_H

#ifdef HAVE_ADL
extern bool adl_active;
extern bool opt_reorder;
Expand All @@ -19,10 +20,14 @@ bool gpu_stats(int gpu, float *temp, int *engineclock, int *memclock, float *vdd
void change_gpusettings(int gpu);
void gpu_autotune(int gpu, enum dev_enable *denable);
void clear_adl(int nDevs);

#else /* HAVE_ADL */

#define adl_active (0)
static inline void init_adl(__maybe_unused int nDevs) {}
static inline void change_gpusettings(__maybe_unused int gpu) { }
static inline void clear_adl(__maybe_unused int nDevs) {}
#endif
#endif

#endif /* HAVE_ADL */

#endif /* ADL_H */
6 changes: 3 additions & 3 deletions compat.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __COMPAT_H__
#define __COMPAT_H__
#ifndef COMPAT_H
#define COMPAT_H

#ifdef WIN32
#include "config.h"
Expand Down Expand Up @@ -88,4 +88,4 @@ typedef long suseconds_t;
#define PTH(thr) ((thr)->pth)
#endif /* WIN32 */

#endif /* __COMPAT_H__ */
#endif /* COMPAT_H */
6 changes: 3 additions & 3 deletions driver-opencl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __DEVICE_GPU_H__
#define __DEVICE_GPU_H__
#ifndef DEVICE_GPU_H
#define DEVICE_GPU_H

#include "miner.h"

Expand Down Expand Up @@ -32,4 +32,4 @@ extern int opt_platform_id;

extern struct device_drv opencl_drv;

#endif /* __DEVICE_GPU_H__ */
#endif /* DEVICE_GPU_H */
8 changes: 5 additions & 3 deletions findnonce.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef __FINDNONCE_H__
#define __FINDNONCE_H__
#ifndef FINDNONCE_H
#define FINDNONCE_H

#include "miner.h"
#include "config.h"

Expand All @@ -11,4 +12,5 @@

extern void precalc_hash(dev_blk_ctx *blk, uint32_t *state, uint32_t *data);
extern void postcalc_hash_async(struct thr_info *thr, struct work *work, uint32_t *res);
#endif /*__FINDNONCE_H__*/

#endif /*FINDNONCE_H*/
6 changes: 3 additions & 3 deletions logging.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __LOGGING_H__
#define __LOGGING_H__
#ifndef LOGGING_H
#define LOGGING_H

#include "config.h"
#include <stdbool.h>
Expand Down Expand Up @@ -100,4 +100,4 @@ extern void _applog(int prio, const char *str, bool force);

#endif

#endif /* __LOGGING_H__ */
#endif /* LOGGING_H */
6 changes: 3 additions & 3 deletions miner.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __MINER_H__
#define __MINER_H__
#ifndef MINER_H
#define MINER_H

#include "config.h"

Expand Down Expand Up @@ -1498,4 +1498,4 @@ extern struct api_data *api_add_diff(struct api_data *root, char *name, double *
extern struct api_data *api_add_percent(struct api_data *root, char *name, double *data, bool copy_data);
extern struct api_data *api_add_avg(struct api_data *root, char *name, float *data, bool copy_data);

#endif /* __MINER_H__ */
#endif /* MINER_H */
7 changes: 4 additions & 3 deletions ocl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __OCL_H__
#define __OCL_H__
#ifndef OCL_H
#define OCL_H

#include "config.h"

Expand Down Expand Up @@ -35,4 +35,5 @@ typedef struct {
extern char *file_contents(const char *filename, int *length);
extern int clDevicesNum(void);
extern _clState *initCl(unsigned int gpu, char *name, size_t nameSize);
#endif /* __OCL_H__ */

#endif /* OCL_H */
6 changes: 3 additions & 3 deletions util.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __UTIL_H__
#define __UTIL_H__
#ifndef UTIL_H
#define UTIL_H

#include <semaphore.h>

Expand Down Expand Up @@ -164,4 +164,4 @@ static inline void align_len(size_t *len)
*len += 4 - (*len % 4);
}

#endif /* __UTIL_H__ */
#endif /* UTIL_H */

0 comments on commit cc735db

Please sign in to comment.