summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-08-03 13:00:07 +0000
committermidipix <writeonce@midipix.org>2019-08-03 13:00:07 +0000
commit831753b17817e33d06c841be66e48be1b05dba54 (patch)
treeb297ee20a3b8f00312e4edc16cda6c18763c0c2b
parent9b952c125ab54db9f217c90acf7790d8be63e11d (diff)
downloadmmglue-831753b17817e33d06c841be66e48be1b05dba54.tar.bz2
mmglue-831753b17817e33d06c841be66e48be1b05dba54.tar.xz
ioctl.h: struct winsize: support both common and arch-specific definition.
-rw-r--r--arch/nt32/bits/ioctl.h12
-rw-r--r--arch/nt64/bits/ioctl.h12
-rw-r--r--project/headers.mk6
3 files changed, 18 insertions, 12 deletions
diff --git a/arch/nt32/bits/ioctl.h b/arch/nt32/bits/ioctl.h
index 9cbfee7..1bae89b 100644
--- a/arch/nt32/bits/ioctl.h
+++ b/arch/nt32/bits/ioctl.h
@@ -87,12 +87,12 @@
#define TIOCSER_TEMT 1
-struct winsize {
- unsigned short ws_row;
- unsigned short ws_col;
- unsigned short ws_xpixel;
- unsigned short ws_ypixel;
-};
+@@@struct winsize {
+@@@ unsigned short ws_row;
+@@@ unsigned short ws_col;
+@@@ unsigned short ws_xpixel;
+@@@ unsigned short ws_ypixel;
+@@@};
#define TIOCM_LE 0x001
#define TIOCM_DTR 0x002
diff --git a/arch/nt64/bits/ioctl.h b/arch/nt64/bits/ioctl.h
index 9cbfee7..1bae89b 100644
--- a/arch/nt64/bits/ioctl.h
+++ b/arch/nt64/bits/ioctl.h
@@ -87,12 +87,12 @@
#define TIOCSER_TEMT 1
-struct winsize {
- unsigned short ws_row;
- unsigned short ws_col;
- unsigned short ws_xpixel;
- unsigned short ws_ypixel;
-};
+@@@struct winsize {
+@@@ unsigned short ws_row;
+@@@ unsigned short ws_col;
+@@@ unsigned short ws_xpixel;
+@@@ unsigned short ws_ypixel;
+@@@};
#define TIOCM_LE 0x001
#define TIOCM_DTR 0x002
diff --git a/project/headers.mk b/project/headers.mk
index 201188e..af1f57c 100644
--- a/project/headers.mk
+++ b/project/headers.mk
@@ -105,6 +105,12 @@ build/headers.tag: $(ARCH_HEADERS)
touch $@
headers.tag: build/headers.tag $(ARCH_GEN_H)
+ grep -v '^@@@' build/include/bits/ioctl.h \
+ > build/include/bits/ioctl.h.tmp
+ grep 'struct winsize' $(SOURCE_DIR)/include/sys/ioctl.h \
+ || sed 's/^@@@//g' build/include/bits/ioctl.h \
+ > build/include/bits/ioctl.h.tmp
+ mv build/include/bits/ioctl.h.tmp build/include/bits/ioctl.h
touch $@
clean-headers: