summaryrefslogtreecommitdiffstats
path: root/include/osdep.h
blob: 17462069cfbe3b56d8910bda4db4c840245ea9af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

#ifndef __OSDEP_H__
#define __OSDEP_H__

/* os dependant include file, define */
#ifdef __FreeBSD__
    #if __FreeBSD__ >= 5
        #include <sys/limits.h>
    #else
        #include <machine/limits.h>
    #endif

    #include <machine/param.h>

    #define HAVE_SETPROCTITLE

#elif defined(__linux__)

#ifndef _GNU_SOURCE
    #define _GNU_SOURCE        /* for strcasestr */
#endif
    #include <sys/ioctl.h>
    #include <sys/file.h>      /* for flock() */
    #include <strings.h>       /* for strcasecmp() */

    #define NEED_STRLCPY
    #define NEED_STRLCAT

#else

    #error "Unknown OSTYPE"

#endif


#define Signal (signal)

#ifdef NEED_STRLCPY
    size_t strlcpy(char *dst, const char *src, size_t size);
#endif
#ifdef NEED_STRLCAT
    size_t strlcat(char *dst, const char *src, size_t size);
#endif


#endif