OLD | NEW |
1 /* | 1 /* |
2 * dhcpcd - DHCP client daemon | 2 * dhcpcd - DHCP client daemon |
3 * Copyright (c) 2006-2009 Roy Marples <roy@marples.name> | 3 * Copyright (c) 2006-2009 Roy Marples <roy@marples.name> |
4 * All rights reserved | 4 * All rights reserved |
5 | 5 |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #ifndef __restrict | 60 #ifndef __restrict |
61 # if defined(__lint__) | 61 # if defined(__lint__) |
62 # define __restrict | 62 # define __restrict |
63 # elif __STDC_VERSION__ >= 199901L | 63 # elif __STDC_VERSION__ >= 199901L |
64 # define __restrict restrict | 64 # define __restrict restrict |
65 # elif !(2 < __GNUC__ || (2 == __GNU_C && 95 <= __GNUC_VERSION__)) | 65 # elif !(2 < __GNUC__ || (2 == __GNU_C && 95 <= __GNUC_VERSION__)) |
66 # define __restrict | 66 # define __restrict |
67 # endif | 67 # endif |
68 #endif | 68 #endif |
69 | 69 |
| 70 #define UNCONST(a) ((void *)(unsigned long)(const void *)(a)) |
| 71 |
| 72 #if defined(__GNUC__) |
| 73 # define _printf(a, b) __attribute__((__format__(__printf__, a, b))) |
| 74 # define _unused __attribute__((__unused__)) |
| 75 #else |
| 76 # define _printf(a, b) |
| 77 # define _unused |
| 78 #endif |
| 79 |
70 int set_cloexec(int); | 80 int set_cloexec(int); |
71 int set_nonblock(int); | 81 int set_nonblock(int); |
72 char *get_line(FILE * __restrict); | 82 char *get_line(FILE * __restrict); |
73 extern int clock_monotonic; | 83 extern int clock_monotonic; |
74 int get_monotonic(struct timeval *); | 84 int get_monotonic(struct timeval *); |
75 time_t uptime(void); | 85 time_t uptime(void); |
76 int writepid(int, pid_t); | 86 int writepid(int, pid_t); |
77 void *xrealloc(void *, size_t); | 87 void *xrealloc(void *, size_t); |
78 void *xmalloc(size_t); | 88 void *xmalloc(size_t); |
79 void *xzalloc(size_t); | 89 void *xzalloc(size_t); |
80 char *xstrdup(const char *); | 90 char *xstrdup(const char *); |
81 | 91 |
82 #endif | 92 #endif |
OLD | NEW |