diff options
| -rw-r--r-- | src/term.c | 3 | ||||
| -rw-r--r-- | src/wcwidth.h | 1 |
2 files changed, 3 insertions, 1 deletions
| @@ -19,6 +19,7 @@ | |||
| 19 | # ifndef _MSC_VER | 19 | # ifndef _MSC_VER |
| 20 | # include <conio.h> | 20 | # include <conio.h> |
| 21 | # include <unistd.h> | 21 | # include <unistd.h> |
| 22 | # include <stddef.h> | ||
| 22 | # endif | 23 | # endif |
| 23 | #else | 24 | #else |
| 24 | # include <termios.h> | 25 | # include <termios.h> |
| @@ -27,9 +28,9 @@ | |||
| 27 | # include <fcntl.h> | 28 | # include <fcntl.h> |
| 28 | # include <sys/ioctl.h> | 29 | # include <sys/ioctl.h> |
| 29 | # include <unistd.h> | 30 | # include <unistd.h> |
| 30 | # include <wchar.h> | ||
| 31 | # include <locale.h> | 31 | # include <locale.h> |
| 32 | #endif | 32 | #endif |
| 33 | #include <wchar.h> | ||
| 33 | 34 | ||
| 34 | 35 | ||
| 35 | // Windows does not have a wcwidth function, so we use compatibilty code from | 36 | // Windows does not have a wcwidth function, so we use compatibilty code from |
diff --git a/src/wcwidth.h b/src/wcwidth.h index f2fee11..6cb6f6d 100644 --- a/src/wcwidth.h +++ b/src/wcwidth.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #ifdef _WIN32 | 10 | #ifdef _WIN32 |
| 11 | #include <stdint.h> | 11 | #include <stdint.h> |
| 12 | #include <stddef.h> | ||
| 12 | typedef uint32_t mk_wchar_t; // Windows wchar_t can be 16-bit, we need 32-bit | 13 | typedef uint32_t mk_wchar_t; // Windows wchar_t can be 16-bit, we need 32-bit |
| 13 | #else | 14 | #else |
| 14 | #include <wchar.h> | 15 | #include <wchar.h> |
