History

Fix compilation when using -DPTHREAD

We should have this defined for making use of futex locks instead of spin locks. When compiling with -DPTHREAD however, gcc gets confused at our declaration of arrow in devmouse.c, naming the members gives gcc enough of a hint that things work right.

Jacob Moody committed 5 years ago

Commit c5cba491 parent 4c9f5692 files · +5 −5Browse files

Unified · Split

2 files
  1. Make.linux +1 −1
  2. kern/devmouse.c +4 −4
Make.linux+1−1
@@ -5,7 +5,7 @@ AR=ar · 4 unmodified lines
55 AS=as
66 RANLIB=ranlib
77 CC=gcc
8−CFLAGS=-Wall -Wno-missing-braces -ggdb -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -D_THREAD_SAFE $(PTHREAD) -O2
8+CFLAGS=-Wall -Wno-missing-braces -ggdb -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -D_THREAD_SAFE -DPTHREAD $(PTHREAD) -O2
99 O=o
1010 OS=posix
1111 GUI=wl
kern/devmouse.c+4−4
@@ -11,14 +11,14 @@ · 10 unmodified lines
1111 Mouseinfo mouse;
1212 Cursorinfo cursor;
1313 Cursorinfo arrow = {
14− 0,
15− { -1, -1 },
16− { 0xFF, 0xFF, 0x80, 0x01, 0x80, 0x02, 0x80, 0x0C,
14+ .lk = 0,
15+ .offset = { -1, -1 },
16+ .clr = { 0xFF, 0xFF, 0x80, 0x01, 0x80, 0x02, 0x80, 0x0C,
1717 0x80, 0x10, 0x80, 0x10, 0x80, 0x08, 0x80, 0x04,
1818 0x80, 0x02, 0x80, 0x01, 0x80, 0x02, 0x8C, 0x04,
1919 0x92, 0x08, 0x91, 0x10, 0xA0, 0xA0, 0xC0, 0x40,
2020 },
21− { 0x00, 0x00, 0x7F, 0xFE, 0x7F, 0xFC, 0x7F, 0xF0,
21+ .set = { 0x00, 0x00, 0x7F, 0xFE, 0x7F, 0xFC, 0x7F, 0xF0,
2222 0x7F, 0xE0, 0x7F, 0xE0, 0x7F, 0xF0, 0x7F, 0xF8,
2323 0x7F, 0xFC, 0x7F, 0xFE, 0x7F, 0xFC, 0x73, 0xF8,
2424 0x61, 0xF0, 0x60, 0xE0, 0x40, 0x40, 0x00, 0x00,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t