Changeset 76 for trunk/include
- Timestamp:
- Dec 19, 2006, 10:01:59 PM (18 years ago)
- Location:
- trunk/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/samhain.h
r68 r76 301 301 **************************************************/ 302 302 303 #if defined(__GNUC__) && (__GNUC__ >= 4) 304 #define SH_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) 305 #else 306 #define SH_GNUC_NULL_TERMINATED 307 #endif 308 309 /* The semantics of the built-in are that it is expected that expr == const 310 * for __builtin_expect ((expr), const) 311 */ 312 #if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) 313 #define SH_LIKELY(expr) (__builtin_expect((expr), 1)) 314 #define SH_UNLIKELY(expr) (__builtin_expect((expr), 0)) 315 #else 316 #define SH_LIKELY(expr) (expr) 317 #define SH_UNLIKELY(expr) (expr) 318 #endif 319 303 320 /* signal-safe log function 304 321 */ -
trunk/include/sh_utils.h
r68 r76 61 61 62 62 char * sh_util_strdup (const char * str); 63 char * sh_util_strdup_l (const char * str, size_t len); 63 64 char * sh_util_strsep (char **str, const char *delim); 64 65 … … 143 144 * Arhument list must be NULL terminated. 144 145 */ 145 char * sh_util_strconcat (const char * arg1, ...) ;146 char * sh_util_strconcat (const char * arg1, ...) SH_GNUC_NULL_TERMINATED; 146 147 147 148 /* check if string is numeric only -
trunk/include/slib.h
r34 r76 293 293 * ---------------------------------------------------------------- */ 294 294 295 SL_TICKET sl_make_ticket (int fd, c har * path);295 SL_TICKET sl_make_ticket (int fd, const char * path); 296 296 297 297 /* Open for writing. … … 365 365 */ 366 366 int sl_write_line (SL_TICKET ticket, void * msg, long nbytes); 367 368 /* As above, but only for non-constant strings. 369 */ 370 int sl_write_line_fast (SL_TICKET ticket, void * msg, long nbytes); 367 371 368 372 /* Drop all metadata for file descriptors >= fd. … … 414 418 #define SL_NOPRIV 0x34 415 419 416 #define MAXFILENAME 2048 420 /* Suitable for Linux 421 */ 422 #define MAXFILENAME 4096 417 423 418 424
Note:
See TracChangeset
for help on using the changeset viewer.