From 061f40e796030d1301b7ad1d1efed226a668a71d Mon Sep 17 00:00:00 2001 From: klu2 Date: Mon, 4 Jun 2007 07:31:59 +0000 Subject: [PATCH 1/1] Fix the definition differences issue of termios.h in different version of kernel header and cygwin's include files. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2622 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Dxe/UnixThunk/Bus/SerialIo/UnixSerialIo.h | 48 +++++++++++++++++++ EdkUnixPkg/Dxe/UnixThunk/Cpu/Cpu.c | 2 +- EdkUnixPkg/Dxe/UnixThunk/Cpu/CpuDriver.h | 2 +- EdkUnixPkg/Sec/UnixThunk.c | 2 + 4 files changed, 52 insertions(+), 2 deletions(-) diff --git a/EdkUnixPkg/Dxe/UnixThunk/Bus/SerialIo/UnixSerialIo.h b/EdkUnixPkg/Dxe/UnixThunk/Bus/SerialIo/UnixSerialIo.h index 30109e2529..dad704c966 100644 --- a/EdkUnixPkg/Dxe/UnixThunk/Bus/SerialIo/UnixSerialIo.h +++ b/EdkUnixPkg/Dxe/UnixThunk/Bus/SerialIo/UnixSerialIo.h @@ -132,6 +132,54 @@ extern EFI_COMPONENT_NAME_PROTOCOL gUnixSerialIoComponentName; // #define SERIAL_PORT_MAX_BAUD_RATE 115400 +// +// Fix the differences issue of linux header files termios.h +// +#ifndef B460800 +#define B460800 0010004 +#endif +#ifndef B500000 +#define B500000 0010005 +#endif +#ifndef B576000 +#define B576000 0010006 +#endif +#ifndef B921600 +#define B921600 0010007 +#endif +#ifndef B1000000 +#define B1000000 0010010 +#endif +#ifndef B1152000 +#define B1152000 0010011 +#endif +#ifndef B1500000 +#define B1500000 0010012 +#endif +#ifndef B2000000 +#define B2000000 0010013 +#endif +#ifndef B2500000 +#define B2500000 0010014 +#endif +#ifndef B3000000 +#define B3000000 0010015 +#endif +#ifndef B3500000 +#define B3500000 0010016 +#endif +#ifndef B4000000 +#define B4000000 0010017 +#endif +#ifndef __MAX_BAUD +#define __MAX_BAUD B4000000 +#endif +#ifndef CMSPAR +#define CMSPAR 010000000000 /* mark or space (stick) parity */ +#endif +#ifndef FIONREAD +#define FIONREAD 0x541B +#endif // // Function Prototypes // diff --git a/EdkUnixPkg/Dxe/UnixThunk/Cpu/Cpu.c b/EdkUnixPkg/Dxe/UnixThunk/Cpu/Cpu.c index 9166a8a0a2..af27d7baa1 100644 --- a/EdkUnixPkg/Dxe/UnixThunk/Cpu/Cpu.c +++ b/EdkUnixPkg/Dxe/UnixThunk/Cpu/Cpu.c @@ -651,7 +651,7 @@ Returns: // // Initialize strings to HII database // - PackageList = PreparePackages (1, &gEfiProcessorProducerGuid, STRING_ARRAY_NAME); + PackageList = PreparePackages (1, &gEfiProcessorProducerGuid, CpuStrings); Status = Hii->NewPack (Hii, PackageList, &StringHandle); ASSERT (!EFI_ERROR (Status)); diff --git a/EdkUnixPkg/Dxe/UnixThunk/Cpu/CpuDriver.h b/EdkUnixPkg/Dxe/UnixThunk/Cpu/CpuDriver.h index d7254203d5..254e62652e 100644 --- a/EdkUnixPkg/Dxe/UnixThunk/Cpu/CpuDriver.h +++ b/EdkUnixPkg/Dxe/UnixThunk/Cpu/CpuDriver.h @@ -24,7 +24,7 @@ Abstract: -extern UINT8 STRING_ARRAY_NAME[]; +extern UINT8 CpuStrings[]; // // Internal Data Structures diff --git a/EdkUnixPkg/Sec/UnixThunk.c b/EdkUnixPkg/Sec/UnixThunk.c index fcf290ddbb..cce14e50cd 100644 --- a/EdkUnixPkg/Sec/UnixThunk.c +++ b/EdkUnixPkg/Sec/UnixThunk.c @@ -40,6 +40,8 @@ Abstract: #include #include +extern ioctl (int fd, unsigned long int __request, ...); + static int settimer_initialized; static struct timeval settimer_timeval; static void (*settimer_callback)(UINT64 delta); -- 2.39.2