Skip to content

Commit

Permalink
GH a2o#119: Create a set of #define statements that add snoopy_ p…
Browse files Browse the repository at this point in the history
…refix to all external library's symbols - TODO add patches
  • Loading branch information
bostjan committed Nov 26, 2020
1 parent f54f260 commit f255443
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/inih/src/ini.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ home page for more info:
#ifndef __INI_H__
#define __INI_H__

/* For Snoopy - redefine function names, to avoid symbol name collisions */
#define ini_parse snoopy_ini_parse
#define ini_parse_file snoopy_ini_parse_file
#define ini_parse_stream snoopy_ini_parse_stream
#define ini_parse_string snoopy_ini_parse_string

/* Make this header file easier to include in C++ code */
#ifdef __cplusplus
extern "C" {
Expand Down
10 changes: 10 additions & 0 deletions lib/liblcthw/src/list.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#ifndef lcthw_List_h
#define lcthw_List_h

#define List_clear snoopy_List_clear
#define List_clear_destroy snoopy_List_clear_destroy
#define List_create snoopy_List_create
#define List_destroy snoopy_List_destroy
#define List_pop snoopy_List_pop
#define List_push snoopy_List_push
#define List_remove snoopy_List_remove
#define List_shift snoopy_List_shift
#define List_unshift snoopy_List_unshift

#include <stdlib.h>

struct ListNode;
Expand Down

0 comments on commit f255443

Please sign in to comment.