* Avoid using common symbols in v850 libgloss
@ 2022-02-10 1:58 Jeff Law
2022-02-10 15:03 ` Corinna Vinschen
2022-03-20 1:20 ` Mike Frysinger
0 siblings, 2 replies; 6+ messages in thread
From: Jeff Law @ 2022-02-10 1:58 UTC (permalink / raw)
To: Newlib
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
I've had this lying around for probably a year or two at this point.
It just changes all the instance of "errno" from a common symbol to an
extern. I can't offhand recall where the actual definition is, but it
certainly exists in the generic code.
OK for the trunk?
Thanks,
Jeff
[-- Attachment #2: 0004-v850-errno.patch --]
[-- Type: text/plain, Size: 16730 bytes --]
diff --git a/libgloss/v850/_exit.c b/libgloss/v850/_exit.c
index b45ae96c..44d4132b 100644
--- a/libgloss/v850/_exit.c
+++ b/libgloss/v850/_exit.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/chmod.c b/libgloss/v850/chmod.c
index c86e5c90..01ccd97b 100644
--- a/libgloss/v850/chmod.c
+++ b/libgloss/v850/chmod.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/chown.c b/libgloss/v850/chown.c
index 0344d77a..c34a9d6e 100644
--- a/libgloss/v850/chown.c
+++ b/libgloss/v850/chown.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/close.c b/libgloss/v850/close.c
index 3c62f68e..40301f6a 100644
--- a/libgloss/v850/close.c
+++ b/libgloss/v850/close.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/creat.c b/libgloss/v850/creat.c
index 8d468a68..4989fc0f 100644
--- a/libgloss/v850/creat.c
+++ b/libgloss/v850/creat.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/execv.c b/libgloss/v850/execv.c
index 5286be68..38d74b41 100644
--- a/libgloss/v850/execv.c
+++ b/libgloss/v850/execv.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/execve.c b/libgloss/v850/execve.c
index b8d97f91..3efb98a1 100644
--- a/libgloss/v850/execve.c
+++ b/libgloss/v850/execve.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/fork.c b/libgloss/v850/fork.c
index 116116c1..50bf5fa3 100644
--- a/libgloss/v850/fork.c
+++ b/libgloss/v850/fork.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/fstat.c b/libgloss/v850/fstat.c
index e8783b37..9c1cecea 100644
--- a/libgloss/v850/fstat.c
+++ b/libgloss/v850/fstat.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/getpid.c b/libgloss/v850/getpid.c
index 18fd1494..32ac7fbf 100644
--- a/libgloss/v850/getpid.c
+++ b/libgloss/v850/getpid.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/gettime.c b/libgloss/v850/gettime.c
index fc47532a..7a99f8af 100644
--- a/libgloss/v850/gettime.c
+++ b/libgloss/v850/gettime.c
@@ -4,7 +4,7 @@
#include "sys/syscall.h"
#include "sys/time.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/isatty.c b/libgloss/v850/isatty.c
index 95d2c0e8..248ab524 100644
--- a/libgloss/v850/isatty.c
+++ b/libgloss/v850/isatty.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/kill.c b/libgloss/v850/kill.c
index b8e53955..34e5db79 100644
--- a/libgloss/v850/kill.c
+++ b/libgloss/v850/kill.c
@@ -4,7 +4,7 @@
#include "sys/syscall.h"
#include <reent.h>
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/link.c b/libgloss/v850/link.c
index 9776d799..f079d372 100644
--- a/libgloss/v850/link.c
+++ b/libgloss/v850/link.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/lseek.c b/libgloss/v850/lseek.c
index b5d3ef0c..75c5e0e8 100644
--- a/libgloss/v850/lseek.c
+++ b/libgloss/v850/lseek.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/open.c b/libgloss/v850/open.c
index 96616e52..e8f63f4f 100644
--- a/libgloss/v850/open.c
+++ b/libgloss/v850/open.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/pipe.c b/libgloss/v850/pipe.c
index 494a99e3..c5219798 100644
--- a/libgloss/v850/pipe.c
+++ b/libgloss/v850/pipe.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/read.c b/libgloss/v850/read.c
index ec064cbb..b55d1cb9 100644
--- a/libgloss/v850/read.c
+++ b/libgloss/v850/read.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/stat.c b/libgloss/v850/stat.c
index dc8351e1..b66a669d 100644
--- a/libgloss/v850/stat.c
+++ b/libgloss/v850/stat.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/time.c b/libgloss/v850/time.c
index d0dc93f8..04ea03da 100644
--- a/libgloss/v850/time.c
+++ b/libgloss/v850/time.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/times.c b/libgloss/v850/times.c
index a558267f..242dffd8 100644
--- a/libgloss/v850/times.c
+++ b/libgloss/v850/times.c
@@ -4,7 +4,7 @@
#include "sys/syscall.h"
#include "sys/times.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/unlink.c b/libgloss/v850/unlink.c
index c6261d3e..23c60ec5 100644
--- a/libgloss/v850/unlink.c
+++ b/libgloss/v850/unlink.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/utime.c b/libgloss/v850/utime.c
index ea1f7899..83ee9754 100644
--- a/libgloss/v850/utime.c
+++ b/libgloss/v850/utime.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/wait.c b/libgloss/v850/wait.c
index d8c96f05..9cab5ce7 100644
--- a/libgloss/v850/wait.c
+++ b/libgloss/v850/wait.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/libgloss/v850/write.c b/libgloss/v850/write.c
index 136ac9ec..07bec15d 100644
--- a/libgloss/v850/write.c
+++ b/libgloss/v850/write.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/_exit.c b/newlib/libc/sys/sysnecv850/_exit.c
index b45ae96c..44d4132b 100644
--- a/newlib/libc/sys/sysnecv850/_exit.c
+++ b/newlib/libc/sys/sysnecv850/_exit.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/chmod.c b/newlib/libc/sys/sysnecv850/chmod.c
index c86e5c90..01ccd97b 100644
--- a/newlib/libc/sys/sysnecv850/chmod.c
+++ b/newlib/libc/sys/sysnecv850/chmod.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/chown.c b/newlib/libc/sys/sysnecv850/chown.c
index 0344d77a..c34a9d6e 100644
--- a/newlib/libc/sys/sysnecv850/chown.c
+++ b/newlib/libc/sys/sysnecv850/chown.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/close.c b/newlib/libc/sys/sysnecv850/close.c
index 3c62f68e..40301f6a 100644
--- a/newlib/libc/sys/sysnecv850/close.c
+++ b/newlib/libc/sys/sysnecv850/close.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/creat.c b/newlib/libc/sys/sysnecv850/creat.c
index 8d468a68..4989fc0f 100644
--- a/newlib/libc/sys/sysnecv850/creat.c
+++ b/newlib/libc/sys/sysnecv850/creat.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/execv.c b/newlib/libc/sys/sysnecv850/execv.c
index 5286be68..38d74b41 100644
--- a/newlib/libc/sys/sysnecv850/execv.c
+++ b/newlib/libc/sys/sysnecv850/execv.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/execve.c b/newlib/libc/sys/sysnecv850/execve.c
index b8d97f91..3efb98a1 100644
--- a/newlib/libc/sys/sysnecv850/execve.c
+++ b/newlib/libc/sys/sysnecv850/execve.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/fork.c b/newlib/libc/sys/sysnecv850/fork.c
index 116116c1..50bf5fa3 100644
--- a/newlib/libc/sys/sysnecv850/fork.c
+++ b/newlib/libc/sys/sysnecv850/fork.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/fstat.c b/newlib/libc/sys/sysnecv850/fstat.c
index b7eed0af..f6670390 100644
--- a/newlib/libc/sys/sysnecv850/fstat.c
+++ b/newlib/libc/sys/sysnecv850/fstat.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/getpid.c b/newlib/libc/sys/sysnecv850/getpid.c
index 18fd1494..32ac7fbf 100644
--- a/newlib/libc/sys/sysnecv850/getpid.c
+++ b/newlib/libc/sys/sysnecv850/getpid.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/gettime.c b/newlib/libc/sys/sysnecv850/gettime.c
index fc47532a..7a99f8af 100644
--- a/newlib/libc/sys/sysnecv850/gettime.c
+++ b/newlib/libc/sys/sysnecv850/gettime.c
@@ -4,7 +4,7 @@
#include "sys/syscall.h"
#include "sys/time.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/isatty.c b/newlib/libc/sys/sysnecv850/isatty.c
index 95d2c0e8..248ab524 100644
--- a/newlib/libc/sys/sysnecv850/isatty.c
+++ b/newlib/libc/sys/sysnecv850/isatty.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/kill.c b/newlib/libc/sys/sysnecv850/kill.c
index b8e53955..34e5db79 100644
--- a/newlib/libc/sys/sysnecv850/kill.c
+++ b/newlib/libc/sys/sysnecv850/kill.c
@@ -4,7 +4,7 @@
#include "sys/syscall.h"
#include <reent.h>
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/link.c b/newlib/libc/sys/sysnecv850/link.c
index 9776d799..f079d372 100644
--- a/newlib/libc/sys/sysnecv850/link.c
+++ b/newlib/libc/sys/sysnecv850/link.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/lseek.c b/newlib/libc/sys/sysnecv850/lseek.c
index b5d3ef0c..75c5e0e8 100644
--- a/newlib/libc/sys/sysnecv850/lseek.c
+++ b/newlib/libc/sys/sysnecv850/lseek.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/open.c b/newlib/libc/sys/sysnecv850/open.c
index 96616e52..e8f63f4f 100644
--- a/newlib/libc/sys/sysnecv850/open.c
+++ b/newlib/libc/sys/sysnecv850/open.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/pipe.c b/newlib/libc/sys/sysnecv850/pipe.c
index 494a99e3..c5219798 100644
--- a/newlib/libc/sys/sysnecv850/pipe.c
+++ b/newlib/libc/sys/sysnecv850/pipe.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/read.c b/newlib/libc/sys/sysnecv850/read.c
index ec064cbb..b55d1cb9 100644
--- a/newlib/libc/sys/sysnecv850/read.c
+++ b/newlib/libc/sys/sysnecv850/read.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/rename.c b/newlib/libc/sys/sysnecv850/rename.c
index 9d9f7dbf..0d6e23c3 100644
--- a/newlib/libc/sys/sysnecv850/rename.c
+++ b/newlib/libc/sys/sysnecv850/rename.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/stat.c b/newlib/libc/sys/sysnecv850/stat.c
index dc8351e1..b66a669d 100644
--- a/newlib/libc/sys/sysnecv850/stat.c
+++ b/newlib/libc/sys/sysnecv850/stat.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/time.c b/newlib/libc/sys/sysnecv850/time.c
index d0dc93f8..04ea03da 100644
--- a/newlib/libc/sys/sysnecv850/time.c
+++ b/newlib/libc/sys/sysnecv850/time.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/times.c b/newlib/libc/sys/sysnecv850/times.c
index a558267f..242dffd8 100644
--- a/newlib/libc/sys/sysnecv850/times.c
+++ b/newlib/libc/sys/sysnecv850/times.c
@@ -4,7 +4,7 @@
#include "sys/syscall.h"
#include "sys/times.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/unlink.c b/newlib/libc/sys/sysnecv850/unlink.c
index 34b712f0..eb19d5cb 100644
--- a/newlib/libc/sys/sysnecv850/unlink.c
+++ b/newlib/libc/sys/sysnecv850/unlink.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/utime.c b/newlib/libc/sys/sysnecv850/utime.c
index ea1f7899..83ee9754 100644
--- a/newlib/libc/sys/sysnecv850/utime.c
+++ b/newlib/libc/sys/sysnecv850/utime.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/wait.c b/newlib/libc/sys/sysnecv850/wait.c
index d8c96f05..9cab5ce7 100644
--- a/newlib/libc/sys/sysnecv850/wait.c
+++ b/newlib/libc/sys/sysnecv850/wait.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
diff --git a/newlib/libc/sys/sysnecv850/write.c b/newlib/libc/sys/sysnecv850/write.c
index 136ac9ec..07bec15d 100644
--- a/newlib/libc/sys/sysnecv850/write.c
+++ b/newlib/libc/sys/sysnecv850/write.c
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "sys/syscall.h"
-int errno;
+extern int errno;
int __trap0 (int function, int p1, int p2, int p3);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Avoid using common symbols in v850 libgloss
2022-02-10 1:58 Avoid using common symbols in v850 libgloss Jeff Law
@ 2022-02-10 15:03 ` Corinna Vinschen
2022-03-19 22:54 ` Brian Inglis
2022-03-20 1:20 ` Mike Frysinger
1 sibling, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2022-02-10 15:03 UTC (permalink / raw)
To: newlib
On Feb 9 18:58, Jeff Law wrote:
> I've had this lying around for probably a year or two at this point. It
> just changes all the instance of "errno" from a common symbol to an extern.
> I can't offhand recall where the actual definition is, but it certainly
> exists in the generic code.
>
> OK for the trunk?
Yes, sure, but a real git patch would still be nice :)
Thanks,
Corinna
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Avoid using common symbols in v850 libgloss
2022-02-10 15:03 ` Corinna Vinschen
@ 2022-03-19 22:54 ` Brian Inglis
2022-03-19 23:57 ` Jeff Law
0 siblings, 1 reply; 6+ messages in thread
From: Brian Inglis @ 2022-03-19 22:54 UTC (permalink / raw)
To: newlib; +Cc: Jeff Law
On 2022-03-19 13:31, Jeff Law wrote:
> On 2022-02-10 08:03, Corinna Vinschen wrote:
>> On Feb 9 18:58, Jeff Law wrote:
>>> I've had this lying around for probably a year or two at this
>>> point. It just changes all the instance of "errno" from a common
>>> symbol to an extern.
>>> I can't offhand recall where the actual definition is, but it
>>> certainly exists in the generic code.
>>> OK for the trunk?
>> Yes, sure, but a real git patch would still be nice :)
^^^^^^^^^
> Ping for:
> https://sourceware.org/pipermail/newlib/2022/019155.html
Maintainers expect `git format-patch` output against latest tree sent
using `git send-email` that can be applied from mailbox/maildir by
running `git am [--interactive] ...`.
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Avoid using common symbols in v850 libgloss
2022-03-19 22:54 ` Brian Inglis
@ 2022-03-19 23:57 ` Jeff Law
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Law @ 2022-03-19 23:57 UTC (permalink / raw)
To: newlib
On 3/19/2022 4:54 PM, Brian Inglis wrote:
> On 2022-03-19 13:31, Jeff Law wrote:
>> On 2022-02-10 08:03, Corinna Vinschen wrote:
>>> On Feb 9 18:58, Jeff Law wrote:
>>>> I've had this lying around for probably a year or two at this
>>>> point. It just changes all the instance of "errno" from a common
>>>> symbol to an extern.
>>>> I can't offhand recall where the actual definition is, but it
>>>> certainly exists in the generic code.
>>>> OK for the trunk?
>
>>> Yes, sure, but a real git patch would still be nice :)
> ^^^^^^^^^
> > Ping for:
> > https://sourceware.org/pipermail/newlib/2022/019155.html
>
> Maintainers expect `git format-patch` output against latest tree sent
> using `git send-email` that can be applied from mailbox/maildir by
> running `git am [--interactive] ...`.
I must have missed Corinna's response. It's been a busy few months. I
can certainly provide a git-format-patch variant in the future, assuming
I remember. I don't do much actual work on newlib these days :-)
THanks,
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Avoid using common symbols in v850 libgloss
2022-02-10 1:58 Avoid using common symbols in v850 libgloss Jeff Law
2022-02-10 15:03 ` Corinna Vinschen
@ 2022-03-20 1:20 ` Mike Frysinger
2022-03-20 5:07 ` Jeff Law
1 sibling, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2022-03-20 1:20 UTC (permalink / raw)
To: Jeff Law; +Cc: Newlib
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
On 09 Feb 2022 18:58, Jeff Law wrote:
> I've had this lying around for probably a year or two at this point.
> It just changes all the instance of "errno" from a common symbol to an
> extern. I can't offhand recall where the actual definition is, but it
> certainly exists in the generic code.
>
> --- a/libgloss/v850/_exit.c
> +++ b/libgloss/v850/_exit.c
> @@ -3,7 +3,7 @@
> #include <sys/stat.h>
> #include "sys/syscall.h"
>
> -int errno;
> +extern int errno;
why not just include errno.h ? using `extern int errno;` is so pre-2000 :p.
-mike
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Avoid using common symbols in v850 libgloss
2022-03-20 1:20 ` Mike Frysinger
@ 2022-03-20 5:07 ` Jeff Law
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Law @ 2022-03-20 5:07 UTC (permalink / raw)
To: Newlib
On 3/19/2022 7:20 PM, Mike Frysinger wrote:
> On 09 Feb 2022 18:58, Jeff Law wrote:
>> I've had this lying around for probably a year or two at this point.
>> It just changes all the instance of "errno" from a common symbol to an
>> extern. I can't offhand recall where the actual definition is, but it
>> certainly exists in the generic code.
>>
>> --- a/libgloss/v850/_exit.c
>> +++ b/libgloss/v850/_exit.c
>> @@ -3,7 +3,7 @@
>> #include <sys/stat.h>
>> #include "sys/syscall.h"
>>
>> -int errno;
>> +extern int errno;
> why not just include errno.h ? using `extern int errno;` is so pre-2000 :p.
:-0 I think i wrote it in the late 90s, so you're spot on.
In reality it didn't even cross my mind. No objections if it gets
changed, though ideally I'll never hack v850 newlib again :-)
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-03-20 5:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 1:58 Avoid using common symbols in v850 libgloss Jeff Law
2022-02-10 15:03 ` Corinna Vinschen
2022-03-19 22:54 ` Brian Inglis
2022-03-19 23:57 ` Jeff Law
2022-03-20 1:20 ` Mike Frysinger
2022-03-20 5:07 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).