On Fri, Oct 20, 2023 at 3:04 PM Jayaprakash, N <n.jayaprak...@intel.com> wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4570 > > This commit is for processing the below PR on edk2-libc repo > https://github.com/tianocore/edk2-libc/pull/3 > These are the changes introduced to StdLib to build > an application for the UEFI shell. > Added format macros for int types to Aarch64, ARM, and Ia32. > Also modified the X64 macros so that everything would build > when they are used. > Added some macros that can be used for compatibility that define when > socklen_t has been defined. > Added getopt_long parser from OpenBSD to provide long and > short option parsing capability with getopt.
This patch is unreviewable. You'd think (from the subject) that it's an ARM centric change, but it ends up being a whole squashed up sequence of unrelated changes. Please separate this into one commit per change. > > Cc: Rebecca Cran <rebe...@bsdio.com> > Cc: Michael D Kinney <michael.d.kin...@intel.com> > Cc: Jayaprakash N <n.jayaprak...@intel.com> > Signed-off-by: Tyler Erickson <tyler.erick...@seagate.com> AIUI, if this is Tyler's commit, you need a From: Tyler Erickson <tyler.erick...@seagate.com> (since this is his commit?). Also probably your own Signed-off-by, I'm not sure. Lastly, you can't just take NetBSD's headers like this for one simple reason: UNIX systems have used LP64 for ages, Windows systems use LLP64. What does this mean? UNIX (and thus, code compiled using gcc or clang linux/netbsd/whatever) has sizeof(long) = 8 for 64-bit systems, whereas in MSVC sizeof(long) = 4. So macros like: > #define PRIdPTR "ld" /* intptr_t */ > #define PRIuPTR "lu" /* uintptr_t */ etc, are not correct on MSVC. Tip: since it's pretty safe, you can probably have two headers: 32-bit architectures (ILP32, should not change between MSVC and GCC/clang) and 64-bit architectures (LP64 on GCC/clang, LLP64 on MSVC). The same goes for the other type-related headers (I have *no* idea if those are correct). -- Pedro -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109871): https://edk2.groups.io/g/devel/message/109871 Mute This Topic: https://groups.io/mt/102081650/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-