-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.h
More file actions
27 lines (20 loc) · 683 Bytes
/
common.h
File metadata and controls
27 lines (20 loc) · 683 Bytes
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
#ifndef COMMON_H
#define COMMON_H
#include <stddef.h>
#if EV_MULTIPLICITY
# define EV_UNUSED (void)EV_A
#else
# define EV_UNUSED
#endif
#define FOFFSET(x, y) (ptrdiff_t)(&((x *)NULL)->y)
#define PTR_FROM_FIELD(x, y, z) ((x *)((size_t)z - FOFFSET(x, y)))
#ifndef ev_io_modify
#define ev_io_modify(ev,events_) do { (ev)->events = (ev)->events & EV__IOFDSET | (events_); } while (0)
#endif
extern const char *hostname;
extern const char *oport;
extern const char dfl_port[];
extern const char *gopherroot;
void accesslog(struct client *c, const char *resource, const char *qs, const char *ss);
char *cleanup_path(char *path, char **basename, size_t *pathlen);
#endif