-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
The fix to #98 breaks the build on FreeBSD. In particular, many of the extra constants introduced in the patch have no declaration C side on FreeBSD. This in turn means that GHC HEAD does not build on FreeBSD currently.
A workaround is to define these constants manually in System.Posix.Terminal.Common
:
#ifdef __FreeBSD__
#define BSDLY 0020000
#define IUCLC 0001000
#define OFILL 0000100
#define OFDEL 0000200
#define NLDLY 0000400
#define BS0 0000000
#define BS1 0020000
#define CR0 0000000
#define CR1 0001000
#define CR2 0002000
#define CR3 0003000
#define CRDLY 0003000
#define FF0 0000000
#define FF1 0100000
#define FFDLY 0100000
#define NL0 0000000
#define NL1 0000400
#define TAB1 0004000
#define TAB2 0010000
#define VT0 0000000
#define VT1 0040000
#define VTDLY 0040000
#if OSVERSION < 800000
#define TAB0 0000000
#define TAB3 0014000
#define TABDLY 0014000
#endif
#endif
Not great. But I didn't just invent this patch. I stole it verbatim from the comms/remserial
port.
Another option is to conditionally not compile these modes on platforms that don't support them. But that would be terrible. It would cause the same type of problems as we already have in the network
package.