X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fshmlog.h;h=dc8081f1329c8e6a24d2646c19428127efe594ce;hb=e4d2b385529847b926a716731be4a8c22ed79007;hp=94da2bdb5065fc3e47c4d5d2ecf4d7f14872812f;hpb=684a77442e496ae86e895751fdae2a0abb43234e;p=i3%2Fi3 diff --git a/include/shmlog.h b/include/shmlog.h index 94da2bdb..dc8081f1 100644 --- a/include/shmlog.h +++ b/include/shmlog.h @@ -2,22 +2,25 @@ * vim:ts=4:sw=4:expandtab * * i3 - an improved dynamic tiling window manager - * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE) + * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * * The format of the shmlog data structure which i3 development versions use by * default (ringbuffer for storing the debug log). * */ -#ifndef I3_I3_SHMLOG_H -#define I3_I3_SHMLOG_H +#pragma once + +#include #include +#if !defined(__OpenBSD__) #include +#endif /* Default shmlog size if not set by user. */ extern const int default_shmlog_size; -/* +/** * Header of the shmlog file. Used by i3/src/log.c and i3/i3-dump-log/main.c. * */ @@ -25,7 +28,7 @@ typedef struct i3_shmlog_header { /* Byte offset where the next line will be written to. */ uint32_t offset_next_write; - /* Byte offset where the last wrap occured. */ + /* Byte offset where the last wrap occurred. */ uint32_t offset_last_wrap; /* The size of the logfile in bytes. Since the size is limited to 25 MiB @@ -38,10 +41,10 @@ typedef struct i3_shmlog_header { * and don’t matter — clients use an equality check (==). */ uint32_t wrap_count; +#if !defined(__OpenBSD__) /* pthread condvar which will be broadcasted whenever there is a new * message in the log. i3-dump-log uses this to implement -f (follow, like * tail -f) in an efficient way. */ pthread_cond_t condvar; -} i3_shmlog_header; - #endif +} i3_shmlog_header;