about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--torus.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/torus.h b/torus.h
index 4109b89..9e8697c 100644
--- a/torus.h
+++ b/torus.h
@@ -15,15 +15,13 @@
  */
 
 #include <assert.h>
+#include <stdalign.h>
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <time.h>
 
-#define PACKED __attribute__((packed))
-#define ALIGNED(x) __attribute__((aligned(x)))
-
 #define ARRAY_LEN(a) (sizeof(a) / sizeof((a)[0]))
 
 #undef COLOR_BLACK
@@ -64,8 +62,8 @@ struct Meta {
 	uint32_t accessCount;
 };
 
-struct ALIGNED(4096) Tile {
-	char cells[CELL_ROWS][CELL_COLS];
+struct Tile {
+	alignas(4096) char cells[CELL_ROWS][CELL_COLS];
 	uint8_t colors[CELL_ROWS][CELL_COLS];
 	struct Meta meta;
 };
@@ -90,7 +88,7 @@ struct Map {
 };
 
 struct ServerMessage {
-	enum PACKED {
+	enum {
 		SERVER_TILE,
 		SERVER_MOVE,
 		SERVER_PUT,
@@ -120,7 +118,7 @@ struct ServerMessage {
 static const uint8_t CURSOR_NONE = UINT8_MAX;
 
 struct ClientMessage {
-	enum PACKED {
+	enum {
 		CLIENT_MOVE,
 		CLIENT_PUT,
 		CLIENT_MAP,
'/src/commit/home/.config/cash/cashrc?id=ea50941cc3d3b829104dac8581ae0a9b1a48bb54&follow=1'>Use colours in cash promptsJune McEnroe 2019-01-12Set PSlit like NetBSD shJune McEnroe 2019-01-12Install gnupg2 from pkgsrc and symlink gpgJune McEnroe 2019-01-12Reference cash builtin man pages in cash.1 SEE ALSOJune McEnroe 2019-01-12Restore cash builtin man page datesJune McEnroe 2019-01-12Use local libeditJune McEnroe 2019-01-12Replace libedit MakefileJune McEnroe 2019-01-11Import /usr/src/lib/libedit from NetBSD 8.0June McEnroe 2019-01-11Add PSlit for prompt escapesJune McEnroe 2019-01-11Don't make depend automaticallyJune McEnroe