public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jeff Law <law@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Avoid using common symbols in v850 libgloss
Date: Sun, 20 Mar 2022 00:03:03 +0000 (GMT)	[thread overview]
Message-ID: <20220320000303.8EEB7385840C@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0c8679e080d4d55a0d6b7aefbf52188584b2b8e9

commit 0c8679e080d4d55a0d6b7aefbf52188584b2b8e9
Author: Jeff Law <jeffreyalaw@gmail.com>
Date:   Sat Mar 19 20:01:33 2022 -0400

    Avoid using common symbols in v850 libgloss
    
    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.

Diff:
---
 libgloss/v850/_exit.c                | 2 +-
 libgloss/v850/chmod.c                | 2 +-
 libgloss/v850/chown.c                | 2 +-
 libgloss/v850/close.c                | 2 +-
 libgloss/v850/creat.c                | 2 +-
 libgloss/v850/execv.c                | 2 +-
 libgloss/v850/execve.c               | 2 +-
 libgloss/v850/fork.c                 | 2 +-
 libgloss/v850/fstat.c                | 2 +-
 libgloss/v850/getpid.c               | 2 +-
 libgloss/v850/gettime.c              | 2 +-
 libgloss/v850/isatty.c               | 2 +-
 libgloss/v850/kill.c                 | 2 +-
 libgloss/v850/link.c                 | 2 +-
 libgloss/v850/lseek.c                | 2 +-
 libgloss/v850/open.c                 | 2 +-
 libgloss/v850/pipe.c                 | 2 +-
 libgloss/v850/read.c                 | 2 +-
 libgloss/v850/sim.ld                 | 2 +-
 libgloss/v850/stat.c                 | 2 +-
 libgloss/v850/time.c                 | 2 +-
 libgloss/v850/times.c                | 2 +-
 libgloss/v850/unlink.c               | 2 +-
 libgloss/v850/utime.c                | 2 +-
 libgloss/v850/wait.c                 | 2 +-
 libgloss/v850/write.c                | 2 +-
 newlib/libc/sys/sysnecv850/_exit.c   | 2 +-
 newlib/libc/sys/sysnecv850/chmod.c   | 2 +-
 newlib/libc/sys/sysnecv850/chown.c   | 2 +-
 newlib/libc/sys/sysnecv850/close.c   | 2 +-
 newlib/libc/sys/sysnecv850/creat.c   | 2 +-
 newlib/libc/sys/sysnecv850/execv.c   | 2 +-
 newlib/libc/sys/sysnecv850/execve.c  | 2 +-
 newlib/libc/sys/sysnecv850/fork.c    | 2 +-
 newlib/libc/sys/sysnecv850/fstat.c   | 2 +-
 newlib/libc/sys/sysnecv850/getpid.c  | 2 +-
 newlib/libc/sys/sysnecv850/gettime.c | 2 +-
 newlib/libc/sys/sysnecv850/isatty.c  | 2 +-
 newlib/libc/sys/sysnecv850/kill.c    | 2 +-
 newlib/libc/sys/sysnecv850/link.c    | 2 +-
 newlib/libc/sys/sysnecv850/lseek.c   | 2 +-
 newlib/libc/sys/sysnecv850/open.c    | 2 +-
 newlib/libc/sys/sysnecv850/pipe.c    | 2 +-
 newlib/libc/sys/sysnecv850/read.c    | 2 +-
 newlib/libc/sys/sysnecv850/rename.c  | 2 +-
 newlib/libc/sys/sysnecv850/stat.c    | 2 +-
 newlib/libc/sys/sysnecv850/time.c    | 2 +-
 newlib/libc/sys/sysnecv850/times.c   | 2 +-
 newlib/libc/sys/sysnecv850/unlink.c  | 2 +-
 newlib/libc/sys/sysnecv850/utime.c   | 2 +-
 newlib/libc/sys/sysnecv850/wait.c    | 2 +-
 newlib/libc/sys/sysnecv850/write.c   | 2 +-
 52 files changed, 52 insertions(+), 52 deletions(-)

diff --git a/libgloss/v850/_exit.c b/libgloss/v850/_exit.c
index b45ae96c8..44d4132bd 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 c86e5c902..01ccd97be 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 0344d77a9..c34a9d6e5 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 3c62f68e2..40301f6a3 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 8d468a68c..4989fc0f9 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 5286be68b..38d74b413 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 b8d97f914..3efb98a13 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 116116c1b..50bf5fa3f 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 e8783b376..9c1cecea1 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 18fd1494e..32ac7fbfb 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 fc47532a0..7a99f8af2 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 95d2c0e84..248ab5248 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 b8e53955a..34e5db793 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 9776d7993..f079d3726 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 b5d3ef0c2..75c5e0e83 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 96616e528..e8f63f4f1 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 494a99e36..c5219798c 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 ec064cbb2..b55d1cb9e 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/sim.ld b/libgloss/v850/sim.ld
index 48da1150b..bffff6220 100644
--- a/libgloss/v850/sim.ld
+++ b/libgloss/v850/sim.ld
@@ -195,7 +195,7 @@ SECTIONS
   .debug_typenames 0	: { *(.debug_typenames) }
   .debug_varnames  0	: { *(.debug_varnames) }
   /* User stack.  */
-  .stack 0x200000	:
+  .stack 0x300000	:
   {
 	__stack = .;
 	*(.stack)
diff --git a/libgloss/v850/stat.c b/libgloss/v850/stat.c
index dc8351e1a..b66a669df 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 d0dc93f8a..04ea03da9 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 a558267fe..242dffd8f 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 c6261d3eb..23c60ec53 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 ea1f78993..83ee97544 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 d8c96f05b..9cab5ce72 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 136ac9ec8..07bec15d4 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 b45ae96c8..44d4132bd 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 c86e5c902..01ccd97be 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 0344d77a9..c34a9d6e5 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 3c62f68e2..40301f6a3 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 8d468a68c..4989fc0f9 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 5286be68b..38d74b413 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 b8d97f914..3efb98a13 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 116116c1b..50bf5fa3f 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 b7eed0afe..f66703902 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 18fd1494e..32ac7fbfb 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 fc47532a0..7a99f8af2 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 95d2c0e84..248ab5248 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 b8e53955a..34e5db793 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 9776d7993..f079d3726 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 b5d3ef0c2..75c5e0e83 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 96616e528..e8f63f4f1 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 494a99e36..c5219798c 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 ec064cbb2..b55d1cb9e 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 9d9f7dbf9..0d6e23c33 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 dc8351e1a..b66a669df 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 d0dc93f8a..04ea03da9 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 a558267fe..242dffd8f 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 34b712f02..eb19d5cb7 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 ea1f78993..83ee97544 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 d8c96f05b..9cab5ce72 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 136ac9ec8..07bec15d4 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);


                 reply	other threads:[~2022-03-20  0:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220320000303.8EEB7385840C@sourceware.org \
    --to=law@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).