Changeset 201


Ignore:
Timestamp:
06/05/10 00:45:05 (14 years ago)
Author:
tim
Message:

changed symbol visibility to hidden by default and explicitly exported API functions

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r195 r201  
    11#cflags = '-std=gnu99 -pedantic -Wall'
    2 cflags = '-std=gnu99 -pedantic -Wall -ggdb'
     2cflags = '-std=gnu99 -pedantic -Wall -fvisibility=hidden -ggdb'
    33
    44
  • trunk/include/lru_cache.h

    r169 r201  
    3535#include <string.h>
    3636#include <unistd.h>
    37 #include "talloc.h"
     37#include <talloc.h>
     38
     39/* GCC-specific macro for library exports */
     40#ifdef _EXPORT
     41#undef _EXPORT
     42#endif
     43#define _EXPORT __attribute__((visibility("default")))
    3844
    3945struct lru_cache_element;
     
    6874 * XXX: finish documenting.
    6975 */
     76_EXPORT
    7077lru_cache* lru_cache_create(uint32_t max_keys, uint32_t secret);
    7178
     
    7481 * XXX: finish documenting.
    7582 */
     83_EXPORT
    7684lru_cache* lru_cache_create_ctx(void* talloc_ctx, uint32_t max_keys,
    7785                                uint32_t secret, bool talloc_data);
     
    8189 * XXX: finish documenting.
    8290 */
     91_EXPORT
    8392void lru_cache_destroy(lru_cache* ht);
    8493
     
    8796 * XXX: finish documenting.
    8897 */
     98_EXPORT
    8999bool lru_cache_update(lru_cache* ht, const void* index,
    90100                      uint32_t index_len, void* data);
     
    96106 *         If no data was found at index, NULL is returned.
    97107 */
     108_EXPORT
    98109void* lru_cache_find(lru_cache* ht, const void* index,
    99110                     uint32_t index_len);
     
    107118 *         at index.
    108119 */
     120_EXPORT
    109121bool lru_cache_remove(lru_cache* ht, const void* index,
    110122                      uint32_t index_len);
  • trunk/include/range_list.h

    r169 r201  
    3636#include <string.h>
    3737#include <math.h>
    38 #include "talloc.h"
     38#include <talloc.h>
     39
     40/* GCC-specific macro for library exports */
     41#ifdef _EXPORT
     42#undef _EXPORT
     43#endif
     44#define _EXPORT __attribute__((visibility("default")))
    3945
    4046typedef struct _range_list_element
     
    5965 * @return A newly allocated range_list, or NULL if an error occurred.
    6066 */
     67_EXPORT
    6168range_list* range_list_new();
    6269
     
    6976 * @param rl the range_list to be free()d.
    7077 */
     78_EXPORT
    7179void range_list_free(range_list* rl);
    7280
     
    7886 * @return The number of elements currently in the list.
    7987 */
     88_EXPORT
    8089uint32_t range_list_size(const range_list* rl);
    8190
     
    97106 * errors may also be possible.
    98107 */
     108_EXPORT
    99109bool range_list_add(range_list* rl, uint32_t offset, uint32_t length, void* data);
    100110
     
    109119 * @return true if the element was successfully removed, false otherwise.
    110120 */
     121_EXPORT
    111122bool range_list_remove(range_list* rl, uint32_t index);
    112123
     
    120131 *         available.
    121132 */
     133_EXPORT
    122134const range_list_element* range_list_get(const range_list* rl, uint32_t index);
    123135
     
    130142 * @return A matching element index or a negative value if none could be found.
    131143 */
     144_EXPORT
    132145int32_t range_list_find(const range_list* rl, uint32_t offset);
    133146
     
    144157 *        element was never set.
    145158 */
     159_EXPORT
    146160void* range_list_find_data(const range_list* rl, uint32_t offset);
    147161
     
    165179 * @return true if the element was successfully split, false otherwise.
    166180 */
     181_EXPORT
    167182bool range_list_split_element(range_list* rl, uint32_t index, uint32_t offset);
    168183
     
    177192 * @return true if the specified range exists and is complete, false otherwise.
    178193 */
     194_EXPORT
    179195bool range_list_has_range(range_list* rl, uint32_t start, uint32_t length);
    180196
  • trunk/include/regfi.h

    r200 r201  
    7171#include <iconv.h>
    7272#include <pthread.h>
     73#include <talloc.h>
    7374
    7475/* regfi headers */
    7576#include <byteorder.h>
    76 #include <talloc.h>
    7777#include <winsec.h>
    7878#include <void_stack.h>
     
    8080#include <lru_cache.h>
    8181
     82/* GCC-specific macro for library exports */
     83#ifdef _EXPORT
     84#undef _EXPORT
     85#endif
     86#define _EXPORT __attribute__((visibility("default")))
    8287
    8388
     
    859864 * @ingroup regfiBase
    860865 */
    861 REGFI_FILE*           regfi_alloc(int fd);
     866_EXPORT
     867REGFI_FILE* regfi_alloc(int fd);
    862868
    863869
     
    874880 * @ingroup regfiBase
    875881 */
    876 REGFI_FILE*           regfi_alloc_cb(REGFI_RAW_FILE* file_cb);
     882_EXPORT
     883REGFI_FILE* regfi_alloc_cb(REGFI_RAW_FILE* file_cb);
    877884
    878885
     
    883890 * @ingroup regfiBase
    884891 */
    885 void                  regfi_free(REGFI_FILE* file);
     892_EXPORT
     893void regfi_free(REGFI_FILE* file);
    886894
    887895
     
    893901 * @ingroup regfiBase
    894902 */
     903_EXPORT
    895904char* regfi_log_get_str();
    896905
     
    922931 * @ingroup regfiBase
    923932 */
     933_EXPORT
    924934bool regfi_log_set_mask(uint16_t mask);
    925935
     
    939949 * @ingroup regfiBase
    940950 */
     951_EXPORT
    941952void regfi_free_record(const void* record);
    942953
     
    969980 * @ingroup regfiIteratorLayer
    970981 */
    971 REGFI_ITERATOR*       regfi_iterator_new(REGFI_FILE* file,
     982_EXPORT
     983REGFI_ITERATOR* regfi_iterator_new(REGFI_FILE* file,
    972984                                         REGFI_ENCODING output_encoding);
    973985
     
    981993 * @ingroup regfiIteratorLayer
    982994 */
    983 void                  regfi_iterator_free(REGFI_ITERATOR* i);
     995_EXPORT
     996void regfi_iterator_free(REGFI_ITERATOR* i);
    984997
    985998
     
    9971010 * @ingroup regfiIteratorLayer
    9981011 */
    999 bool                  regfi_iterator_down(REGFI_ITERATOR* i);
     1012_EXPORT
     1013bool regfi_iterator_down(REGFI_ITERATOR* i);
    10001014
    10011015
     
    10091023 * @ingroup regfiIteratorLayer
    10101024 */
    1011 bool                  regfi_iterator_up(REGFI_ITERATOR* i);
     1025_EXPORT
     1026bool regfi_iterator_up(REGFI_ITERATOR* i);
    10121027
    10131028
     
    10201035 * @ingroup regfiIteratorLayer
    10211036 */
    1022 bool                  regfi_iterator_to_root(REGFI_ITERATOR* i);
     1037_EXPORT
     1038bool regfi_iterator_to_root(REGFI_ITERATOR* i);
    10231039
    10241040
     
    10411057 * @ingroup regfiIteratorLayer
    10421058 */
     1059_EXPORT
    10431060bool regfi_iterator_walk_path(REGFI_ITERATOR* i, const char** path);
    10441061
     
    10521069 * @ingroup regfiIteratorLayer
    10531070 */
     1071_EXPORT
    10541072const REGFI_NK_REC* regfi_iterator_cur_key(REGFI_ITERATOR* i);
    10551073
     
    10631081 * @ingroup regfiIteratorLayer
    10641082 */
     1083_EXPORT
    10651084const REGFI_SK_REC* regfi_iterator_cur_sk(REGFI_ITERATOR* i);
    10661085
     
    10751094 * @ingroup regfiIteratorLayer
    10761095 */
     1096_EXPORT
    10771097bool regfi_iterator_first_subkey(REGFI_ITERATOR* i);
    10781098
     
    10881108 * @ingroup regfiIteratorLayer
    10891109 */
     1110_EXPORT
    10901111const REGFI_NK_REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i);
    10911112
     
    10991120 * @ingroup regfiIteratorLayer
    11001121 */
     1122_EXPORT
    11011123bool regfi_iterator_next_subkey(REGFI_ITERATOR* i);
    11021124
     
    11131135 * @ingroup regfiIteratorLayer
    11141136 */
     1137_EXPORT
    11151138bool regfi_iterator_find_subkey(REGFI_ITERATOR* i, const char* subkey_name);
    11161139
     
    11251148 * @ingroup regfiIteratorLayer
    11261149 */
     1150_EXPORT
    11271151bool regfi_iterator_first_value(REGFI_ITERATOR* i);
    11281152
     
    11381162 * @ingroup regfiIteratorLayer
    11391163 */
     1164_EXPORT
    11401165const REGFI_VK_REC* regfi_iterator_cur_value(REGFI_ITERATOR* i);
    11411166
     
    11491174 * @ingroup regfiIteratorLayer
    11501175 */
     1176_EXPORT
    11511177bool regfi_iterator_next_value(REGFI_ITERATOR* i);
    11521178
     
    11631189 * @ingroup regfiIteratorLayer
    11641190 */
    1165 bool                  regfi_iterator_find_value(REGFI_ITERATOR* i,
    1166                                                 const char* value_name);
     1191_EXPORT
     1192bool regfi_iterator_find_value(REGFI_ITERATOR* i,
     1193                               const char* value_name);
    11671194
    11681195/** Retrieves classname for a given key.
     
    11761203 * @ingroup regfiIteratorLayer
    11771204 */
     1205_EXPORT
    11781206const REGFI_CLASSNAME* regfi_iterator_fetch_classname(REGFI_ITERATOR* i,
    11791207                                                      const REGFI_NK_REC* key);
     
    11901218 * @ingroup regfiIteratorLayer
    11911219 */
     1220_EXPORT
    11921221const REGFI_DATA* regfi_iterator_fetch_data(REGFI_ITERATOR* i,
    11931222                                            const REGFI_VK_REC* value);
     
    12071236 * @ingroup regfiGlueLayer
    12081237 */
    1209 REGFI_NK_REC*         regfi_load_key(REGFI_FILE* file, uint32_t offset,
    1210                                      REGFI_ENCODING output_encoding,
    1211                                      bool strict);
     1238_EXPORT
     1239REGFI_NK_REC* regfi_load_key(REGFI_FILE* file, uint32_t offset,
     1240                             REGFI_ENCODING output_encoding,
     1241                             bool strict);
    12121242
    12131243
     
    12181248 * @ingroup regfiGlueLayer
    12191249 */
    1220 REGFI_VK_REC*         regfi_load_value(REGFI_FILE* file, uint32_t offset,
    1221                                        REGFI_ENCODING output_encoding,
     1250_EXPORT
     1251REGFI_VK_REC* regfi_load_value(REGFI_FILE* file, uint32_t offset,
     1252                               REGFI_ENCODING output_encoding,
     1253                               bool strict);
     1254
     1255
     1256/** Loads a logical subkey list in its entirety which may span multiple records.
     1257 *
     1258 * XXX: finish documenting
     1259 *
     1260 * @ingroup regfiGlueLayer
     1261 */
     1262_EXPORT
     1263REGFI_SUBKEY_LIST* regfi_load_subkeylist(REGFI_FILE* file, uint32_t offset,
     1264                                         uint32_t num_keys, uint32_t max_size,
     1265                                         bool strict);
     1266
     1267
     1268/** Loads a valuelist.
     1269 *
     1270 * XXX: finish documenting
     1271 *
     1272 * @ingroup regfiGlueLayer
     1273 */
     1274_EXPORT
     1275REGFI_VALUE_LIST* regfi_load_valuelist(REGFI_FILE* file, uint32_t offset,
     1276                                       uint32_t num_values, uint32_t max_size,
    12221277                                       bool strict);
    1223 
    1224 
    1225 /** Loads a logical subkey list in its entirety which may span multiple records.
    1226  *
    1227  * XXX: finish documenting
    1228  *
    1229  * @ingroup regfiGlueLayer
    1230  */
    1231 REGFI_SUBKEY_LIST*    regfi_load_subkeylist(REGFI_FILE* file, uint32_t offset,
    1232                                             uint32_t num_keys, uint32_t max_size,
    1233                                             bool strict);
    1234 
    1235 
    1236 /** Loads a valuelist.
    1237  *
    1238  * XXX: finish documenting
    1239  *
    1240  * @ingroup regfiGlueLayer
    1241  */
    1242 REGFI_VALUE_LIST*     regfi_load_valuelist(REGFI_FILE* file, uint32_t offset,
    1243                                            uint32_t num_values, uint32_t max_size,
    1244                                            bool strict);
    12451278
    12461279
     
    12521285 * @ingroup regfiGlueLayer
    12531286 */
    1254 REGFI_BUFFER          regfi_load_data(REGFI_FILE* file, uint32_t voffset,
    1255                                       uint32_t length, bool data_in_offset,
    1256                                       bool strict);
     1287_EXPORT
     1288REGFI_BUFFER regfi_load_data(REGFI_FILE* file, uint32_t voffset,
     1289                             uint32_t length, bool data_in_offset,
     1290                             bool strict);
    12571291
    12581292
     
    12631297 * @ingroup regfiGlueLayer
    12641298 */
    1265 REGFI_BUFFER          regfi_load_big_data(REGFI_FILE* file, uint32_t offset,
    1266                                           uint32_t data_length,uint32_t cell_length,
    1267                                           range_list* used_ranges,
    1268                                           bool strict);
     1299_EXPORT
     1300REGFI_BUFFER regfi_load_big_data(REGFI_FILE* file, uint32_t offset,
     1301                                 uint32_t data_length,uint32_t cell_length,
     1302                                 range_list* used_ranges,
     1303                                 bool strict);
    12691304
    12701305
     
    12761311 * @ingroup regfiGlueLayer
    12771312 */
    1278 bool                  regfi_interpret_data(REGFI_FILE* file,
    1279                                            REGFI_ENCODING string_encoding,
    1280                                            uint32_t type, REGFI_DATA* data);
     1313_EXPORT
     1314bool regfi_interpret_data(REGFI_FILE* file,
     1315                          REGFI_ENCODING string_encoding,
     1316                          uint32_t type, REGFI_DATA* data);
    12811317
    12821318
     
    12901326 * @ingroup regfiGlueLayer
    12911327 */
    1292 const REGFI_SK_REC*   regfi_load_sk(REGFI_FILE* file, uint32_t offset,
    1293                                     bool strict);
     1328_EXPORT
     1329const REGFI_SK_REC* regfi_load_sk(REGFI_FILE* file, uint32_t offset,
     1330                                  bool strict);
    12941331
    12951332
     
    13001337 * @ingroup regfiGlueLayer
    13011338 */
    1302 const REGFI_HBIN*     regfi_lookup_hbin(REGFI_FILE* file, uint32_t offset);
     1339_EXPORT
     1340const REGFI_HBIN* regfi_lookup_hbin(REGFI_FILE* file, uint32_t offset);
    13031341
    13041342
     
    13101348/******************************************************************************/
    13111349
    1312 REGFI_FILE*           regfi_parse_regf(REGFI_RAW_FILE* file_cb, bool strict);
    1313 REGFI_HBIN*           regfi_parse_hbin(REGFI_FILE* file, uint32_t offset,
    1314                                        bool strict);
     1350_EXPORT
     1351REGFI_FILE* regfi_parse_regf(REGFI_RAW_FILE* file_cb, bool strict);
     1352
     1353_EXPORT
     1354REGFI_HBIN* regfi_parse_hbin(REGFI_FILE* file, uint32_t offset,
     1355                             bool strict);
    13151356
    13161357
     
    13271368 * @ingroup regfiParseLayer
    13281369 */
    1329 REGFI_NK_REC*         regfi_parse_nk(REGFI_FILE* file, uint32_t offset,
    1330                                      uint32_t max_size, bool strict);
     1370_EXPORT
     1371REGFI_NK_REC* regfi_parse_nk(REGFI_FILE* file, uint32_t offset,
     1372                             uint32_t max_size, bool strict);
    13311373
    13321374
     
    13371379 * @ingroup regfiParseLayer
    13381380 */
    1339 REGFI_SUBKEY_LIST*    regfi_parse_subkeylist(REGFI_FILE* file, uint32_t offset,
    1340                                              uint32_t max_size, bool strict);
     1381_EXPORT
     1382REGFI_SUBKEY_LIST* regfi_parse_subkeylist(REGFI_FILE* file, uint32_t offset,
     1383                                          uint32_t max_size, bool strict);
    13411384
    13421385
     
    13471390 * @ingroup regfiParseLayer
    13481391 */
    1349 REGFI_VK_REC*         regfi_parse_vk(REGFI_FILE* file, uint32_t offset,
    1350                                      uint32_t max_size, bool strict);
     1392_EXPORT
     1393REGFI_VK_REC* regfi_parse_vk(REGFI_FILE* file, uint32_t offset,
     1394                             uint32_t max_size, bool strict);
    13511395
    13521396
     
    13571401 * @ingroup regfiParseLayer
    13581402 */
    1359 REGFI_SK_REC*         regfi_parse_sk(REGFI_FILE* file, uint32_t offset,
    1360                                      uint32_t max_size, bool strict);
     1403_EXPORT
     1404REGFI_SK_REC* regfi_parse_sk(REGFI_FILE* file, uint32_t offset,
     1405                             uint32_t max_size, bool strict);
    13611406
    13621407
     
    13701415 * @ingroup regfiParseLayer
    13711416 */
    1372 range_list*           regfi_parse_unalloc_cells(REGFI_FILE* file);
     1417_EXPORT
     1418range_list* regfi_parse_unalloc_cells(REGFI_FILE* file);
    13731419
    13741420
     
    13791425 * @ingroup regfiParseLayer
    13801426 */
    1381 bool                  regfi_parse_cell(REGFI_RAW_FILE* file_cb, uint32_t offset,
    1382                                        uint8_t* hdr, uint32_t hdr_len,
    1383                                        uint32_t* cell_length, bool* unalloc);
     1427_EXPORT
     1428bool regfi_parse_cell(REGFI_RAW_FILE* file_cb, uint32_t offset,
     1429                      uint8_t* hdr, uint32_t hdr_len,
     1430                      uint32_t* cell_length, bool* unalloc);
    13841431
    13851432
     
    13901437 * @ingroup regfiParseLayer
    13911438 */
    1392 uint8_t*                regfi_parse_classname(REGFI_FILE* file, uint32_t offset,
    1393                                             uint16_t* name_length,
    1394                                             uint32_t max_size, bool strict);
     1439_EXPORT
     1440uint8_t* regfi_parse_classname(REGFI_FILE* file, uint32_t offset,
     1441                               uint16_t* name_length,
     1442                               uint32_t max_size, bool strict);
    13951443
    13961444
     
    14011449 * @ingroup regfiParseLayer
    14021450 */
    1403 REGFI_BUFFER          regfi_parse_data(REGFI_FILE* file, uint32_t offset,
    1404                                        uint32_t length, bool strict);
     1451_EXPORT
     1452REGFI_BUFFER regfi_parse_data(REGFI_FILE* file, uint32_t offset,
     1453                              uint32_t length, bool strict);
    14051454
    14061455
     
    14121461 * @ingroup regfiParseLayer
    14131462 */
    1414 REGFI_BUFFER          regfi_parse_little_data(REGFI_FILE* file, uint32_t voffset,
    1415                                               uint32_t length, bool strict);
     1463_EXPORT
     1464REGFI_BUFFER regfi_parse_little_data(REGFI_FILE* file, uint32_t voffset,
     1465                                     uint32_t length, bool strict);
    14161466
    14171467
     
    14261476ssize_t               regfi_raw_read(REGFI_RAW_FILE* self,
    14271477                                     void* buf, size_t count);
     1478_EXPORT
    14281479off_t                 regfi_seek(REGFI_RAW_FILE* file_cb,
    14291480                                 off_t offset, int whence);
     1481_EXPORT
    14301482uint32_t              regfi_read(REGFI_RAW_FILE* file_cb,
    14311483                                 uint8_t* buf, uint32_t* length);
    14321484
     1485_EXPORT
    14331486const char*           regfi_type_val2str(unsigned int val);
     1487_EXPORT
    14341488int                   regfi_type_str2val(const char* str);
    14351489
     1490_EXPORT
    14361491char*                 regfi_get_sacl(WINSEC_DESC* sec_desc);
     1492_EXPORT
    14371493char*                 regfi_get_dacl(WINSEC_DESC* sec_desc);
     1494_EXPORT
    14381495char*                 regfi_get_owner(WINSEC_DESC* sec_desc);
     1496_EXPORT
    14391497char*                 regfi_get_group(WINSEC_DESC* sec_desc);
    14401498
     
    14491507REGFI_NK_REC*         regfi_copy_nk(const REGFI_NK_REC* nk);
    14501508REGFI_VK_REC*         regfi_copy_vk(const REGFI_VK_REC* vk);
     1509_EXPORT
    14511510int32_t               regfi_calc_maxsize(REGFI_FILE* file, uint32_t offset);
    14521511int32_t               regfi_conv_charset(const char* input_charset,
     
    14541513                                         uint8_t* input, char* output,
    14551514                                         uint32_t input_len, uint32_t output_max);
     1515_EXPORT
    14561516REGFI_DATA*           regfi_buffer_to_data(REGFI_BUFFER raw_data);
    14571517
    14581518/* XXX: move to base API and document */
     1519_EXPORT
    14591520void                  regfi_unix2nt_time(REGFI_NTTIME* nt, time_t t);
     1521_EXPORT
    14601522time_t                regfi_nt2unix_time(const REGFI_NTTIME* nt);
    14611523
    14621524
     1525_EXPORT
    14631526void regfi_interpret_keyname(REGFI_FILE* file, REGFI_NK_REC* nk,
    14641527                             REGFI_ENCODING output_encoding, bool strict);
     1528_EXPORT
    14651529void regfi_interpret_valuename(REGFI_FILE* file, REGFI_VK_REC* vk,
    14661530                               REGFI_ENCODING output_encoding, bool strict);
  • trunk/include/void_stack.h

    r169 r201  
    3232#include <stdbool.h>
    3333#include <string.h>
    34 #include "talloc.h"
     34#include <talloc.h>
     35
     36/* GCC-specific macro for library exports */
     37#ifdef _EXPORT
     38#undef _EXPORT
     39#endif
     40#define _EXPORT __attribute__((visibility("default")))
    3541
    3642/** XXX: document this. */
     
    5965 *         or NULL if an error occurred.
    6066 */
     67_EXPORT
    6168void_stack* void_stack_new(unsigned short max_size);
    6269
     
    6875 * @return a pointer to the duplicate void_stack, or NULL if an error occurred.
    6976 */
     77_EXPORT
    7078void_stack* void_stack_copy(const void_stack* v);
    7179
     
    7886 *         (which will be in reverse order), or NULL if an error occurred.
    7987 */
     88_EXPORT
    8089void_stack* void_stack_copy_reverse(const void_stack* v);
    8190
     
    8695 * @param stack the stack to be free()d.
    8796 */
     97_EXPORT
    8898void void_stack_free(void_stack* stack);
    8999
     
    98108 * @param stack the stack to be free()d.
    99109 */
     110_EXPORT
    100111void void_stack_free_deep(void_stack* stack);
    101112
     
    107118 * @return the number of elements currently on the stack.
    108119 */
     120_EXPORT
    109121unsigned short void_stack_size(const void_stack* stack);
    110122
     
    117129 *         on the stack.
    118130 */
     131_EXPORT
    119132void* void_stack_pop(void_stack* stack);
    120133
     
    127140 * @return true if the element was successfully added, false otherwise.
    128141 */
     142_EXPORT
    129143bool void_stack_push(void_stack* stack, void* e);
    130144
     
    137151 *         no elements exist in the stack.
    138152 */
     153_EXPORT
    139154const void* void_stack_cur(const void_stack* stack);
    140155
     
    146161 * @return a new void_stack_iterator, or NULL if an error occurred.
    147162 */
     163_EXPORT
    148164void_stack_iterator* void_stack_iterator_new(const void_stack* stack);
    149165
     
    155171 * @param iter the void_stack_iterator to be free()d.
    156172 */
     173_EXPORT
    157174void void_stack_iterator_free(void_stack_iterator* iter);
    158175
     
    166183 * @return a pointer to the next element.
    167184 */
     185_EXPORT
    168186const void* void_stack_iterator_next(void_stack_iterator* iter);
    169187
  • trunk/include/winsec.h

    r169 r201  
    4444#include <sys/types.h>
    4545#include <unistd.h>
    46 
    47 #include "talloc.h"
     46#include <talloc.h>
     47
    4848#include "byteorder.h"
     49
     50/* GCC-specific macro for library exports */
     51#ifdef _EXPORT
     52#undef _EXPORT
     53#endif
     54#define _EXPORT __attribute__((visibility("default")))
    4955
    5056
     
    217223 * XXX: finish documenting
    218224 */
     225_EXPORT
    219226WINSEC_DESC* winsec_parse_descriptor(const uint8_t* buf, uint32_t buf_len);
    220227
     
    224231 * XXX: finish documenting
    225232 */
     233_EXPORT
    226234void winsec_free_descriptor(WINSEC_DESC* desc);
    227235
     
    230238 * XXX: finish documenting
    231239 */
     240_EXPORT
    232241WINSEC_DESC* winsec_parse_desc(void* talloc_ctx,
    233242                               const uint8_t* buf, uint32_t buf_len);
     
    237246 * XXX: finish documenting
    238247 */
     248_EXPORT
    239249WINSEC_ACL* winsec_parse_acl(void* talloc_ctx,
    240250                             const uint8_t* buf, uint32_t buf_len);
     
    244254 * XXX: finish documenting
    245255 */
     256_EXPORT
    246257WINSEC_ACE* winsec_parse_ace(void* talloc_ctx,
    247258                             const uint8_t* buf, uint32_t buf_len);
     
    251262 * XXX: finish documenting
    252263 */
     264_EXPORT
    253265WINSEC_DOM_SID* winsec_parse_dom_sid(void* talloc_ctx,
    254266                                     const uint8_t* buf, uint32_t buf_len);
     
    258270 * XXX: finish documenting
    259271 */
     272_EXPORT
    260273WINSEC_UUID* winsec_parse_uuid(void* talloc_ctx,
    261274                               const uint8_t* buf, uint32_t buf_len);
     
    266279 * XXX: finish documenting
    267280 */
     281_EXPORT
    268282size_t winsec_sid_size(const WINSEC_DOM_SID* sid);
    269283
     
    272286 * XXX: finish documenting
    273287 */
     288_EXPORT
    274289int winsec_sid_compare_auth(const WINSEC_DOM_SID* sid1, const WINSEC_DOM_SID* sid2);
    275290
     
    278293 * XXX: finish documenting
    279294 */
     295_EXPORT
    280296int winsec_sid_compare(const WINSEC_DOM_SID* sid1, const WINSEC_DOM_SID* sid2);
    281297
     
    284300 * XXX: finish documenting
    285301 */
     302_EXPORT
    286303bool winsec_sid_equal(const WINSEC_DOM_SID* sid1, const WINSEC_DOM_SID* sid2);
    287304
     
    290307 * XXX: finish documenting
    291308 */
     309_EXPORT
    292310bool winsec_desc_equal(WINSEC_DESC* s1, WINSEC_DESC* s2);
    293311
     
    296314 * XXX: finish documenting
    297315 */
     316_EXPORT
    298317bool winsec_acl_equal(WINSEC_ACL* s1, WINSEC_ACL* s2);
    299318
     
    302321 * XXX: finish documenting
    303322 */
     323_EXPORT
    304324bool winsec_ace_equal(WINSEC_ACE* s1, WINSEC_ACE* s2);
    305325
     
    308328 * XXX: finish documenting
    309329 */
     330_EXPORT
    310331bool winsec_ace_object(uint8_t type);
    311332
Note: See TracChangeset for help on using the changeset viewer.