[PATCH] libc: Replace i386/sys/fenv.h symlink with an #include shim

David Macek via Newlib <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAH2Hv8LJXU1K3yJwMxxOCp0mbULra_o9u0fUG5z28t983wbMhA@mail.gmail.com>
As in fbaa096772f77be664864d80508906ad018cc23b:

Having symlinks leads to issue unpacking the sources on platforms without proper
symlink support.  These platforms mostly extract symlinks from the archive file
as copies of the files the symlinks point to.  If the links appear in the tar
file before the source exists, it cannot copy the file.

The solution in this patch is to convert the files that are symbolic
links into simple files which include the file they were linked to.
This should be more portable and avoids the symbolic link problem.

Signed-off-by: David Macek <[email protected]>
---

Excuse my ignorance, but is this acceptable?  I'm not sure
what actually happens with these files, but it'd be nice to
get rid of the last symlink in the repo.

 newlib/libc/machine/i386/sys/fenv.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
 mode change 120000 => 100644 newlib/libc/machine/i386/sys/fenv.h

diff --git a/newlib/libc/machine/i386/sys/fenv.h
b/newlib/libc/machine/i386/sys/fenv.h
deleted file mode 120000
index 218057825e..0000000000
--- a/newlib/libc/machine/i386/sys/fenv.h
+++ /dev/null
@@ -1 +0,0 @@
-../../x86_64/sys/fenv.h
\ No newline at end of file
diff --git a/newlib/libc/machine/i386/sys/fenv.h
b/newlib/libc/machine/i386/sys/fenv.h
new file mode 100644
index 0000000000..d2c41a6d5a
--- /dev/null
+++ b/newlib/libc/machine/i386/sys/fenv.h
@@ -0,0 +1,5 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include "../../x86_64/sys/fenv.h"

-- 
David Macek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.