2006-11-28 04:23:22 +08:00
|
|
|
/*
|
2007-11-08 00:26:41 +08:00
|
|
|
* dhcpcd - DHCP client daemon
|
2007-11-06 23:03:38 +08:00
|
|
|
* Copyright 2006-2007 Roy Marples <roy@marples.name>
|
2006-11-28 04:23:22 +08:00
|
|
|
*
|
2007-11-08 00:26:41 +08:00
|
|
|
* Distributed under the terms of the GNU General Public License v2
|
2006-11-28 04:23:22 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef COMMON_H
|
|
|
|
#define COMMON_H
|
|
|
|
|
2007-04-06 02:11:05 +08:00
|
|
|
/* string.h pulls in features.h so the below define checks work */
|
|
|
|
#include <string.h>
|
|
|
|
|
2007-04-06 02:05:38 +08:00
|
|
|
/* Only GLIBC doesn't support strlcpy */
|
2007-04-06 01:31:05 +08:00
|
|
|
#ifdef __GLIBC__
|
2007-04-06 02:05:38 +08:00
|
|
|
# if ! defined(__UCLIBC__) && ! defined (__dietlibc__)
|
2007-04-06 01:31:05 +08:00
|
|
|
size_t strlcpy (char *dst, const char *src, size_t size);
|
2007-04-06 02:05:38 +08:00
|
|
|
# endif
|
2007-04-06 01:31:05 +08:00
|
|
|
#endif
|
|
|
|
|
2007-07-18 19:26:59 +08:00
|
|
|
#ifdef __linux__
|
|
|
|
void srandomdev (void);
|
|
|
|
#endif
|
|
|
|
|
2007-09-04 20:48:40 +08:00
|
|
|
void close_fds (void);
|
2007-08-21 17:50:01 +08:00
|
|
|
int get_time (struct timeval *tp);
|
2007-11-08 04:59:52 +08:00
|
|
|
long uptime (void);
|
2007-10-21 00:58:13 +08:00
|
|
|
void writepid (int fd, pid_t pid);
|
2006-11-28 04:23:22 +08:00
|
|
|
void *xmalloc (size_t size);
|
2007-04-27 00:16:56 +08:00
|
|
|
char *xstrdup (const char *str);
|
2007-04-06 00:56:58 +08:00
|
|
|
|
2006-11-28 04:23:22 +08:00
|
|
|
#endif
|