From 0317d79ab80de57676f111569e4de48ef246a1e6 Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Fri, 22 May 2020 17:21:58 -0400
Subject: [PATCH] fix some global vars erroneously declared in headers and
 other places

---
 pd/src/s_audio_mmio.c | 8 ++------
 pd/src/s_audio_oss.c  | 5 -----
 pd/src/s_path.c       | 1 +
 pd/src/s_stuff.h      | 2 +-
 4 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/pd/src/s_audio_mmio.c b/pd/src/s_audio_mmio.c
index 0ada2c23c..3c941dabd 100644
--- a/pd/src/s_audio_mmio.c
+++ b/pd/src/s_audio_mmio.c
@@ -32,7 +32,8 @@ int nt_realdacblksize;
 #define MAXBUFFER 100   /* number of buffers in use at maximum advance */
 #define DEFBUFFER 30    /* default is about 30x6 = 180 msec! */
 static int nt_naudiobuffer = DEFBUFFER;
-t_float sys_dacsr = DEFAULTSRATE;
+
+sys_dacsr = DEFAULTSRATE;
 
 static int nt_whichapi = API_MMIO;
 static int nt_meters;        /* true if we're metering */
@@ -486,11 +487,6 @@ void nt_logerror(int which)
 #endif
 }
 
-/* system buffer with t_sample types for one tick */
-t_sample *sys_soundout;
-t_sample *sys_soundin;
-t_float sys_dacsr;
-
 int mmio_send_dacs(void)
 {
     HMMIO hmmio; 
diff --git a/pd/src/s_audio_oss.c b/pd/src/s_audio_oss.c
index c2153ab35..61718f47b 100644
--- a/pd/src/s_audio_oss.c
+++ b/pd/src/s_audio_oss.c
@@ -67,11 +67,6 @@ static t_oss_dev linux_adcs[OSS_MAXDEV];
 static int linux_noutdevs = 0;
 static int linux_nindevs = 0;
 
-    /* exported variables */
-t_float sys_dacsr;
-t_sample *sys_soundout;
-t_sample *sys_soundin;
-
     /* OSS-specific private variables */
 static int oss_blockmode = 1;   /* flag to use "blockmode"  */
 
diff --git a/pd/src/s_path.c b/pd/src/s_path.c
index 3582626f7..9b2aebb8d 100644
--- a/pd/src/s_path.c
+++ b/pd/src/s_path.c
@@ -45,6 +45,7 @@ t_namelist *sys_searchpath;
 t_namelist *sys_staticpath;
 t_namelist *sys_helppath;
 
+t_namelist *pd_extrapath;
 
     /* change '/' characters to the system's native file separator */
 void sys_bashfilename(const char *from, char *to)
diff --git a/pd/src/s_stuff.h b/pd/src/s_stuff.h
index 0967e0264..04b62b450 100644
--- a/pd/src/s_stuff.h
+++ b/pd/src/s_stuff.h
@@ -18,7 +18,7 @@ typedef struct _namelist    /* element in a linked list of stored strings */
     char *nl_string;            /* the string */
 } t_namelist;
 
-t_namelist *pd_extrapath;
+extern t_namelist *pd_extrapath;
 t_namelist *namelist_append(t_namelist *listwas, const char *s, int allowdup);
 t_namelist *namelist_append_files(t_namelist *listwas, const char *s);
 void namelist_free(t_namelist *listwas);
-- 
GitLab