From a5a334150073b71b9a5dfe46cd636b5f7fb2c6ac Mon Sep 17 00:00:00 2001
From: Martin Stjernholm <mast@lysator.liu.se>
Date: Wed, 5 Jul 2006 04:17:09 +0200
Subject: [PATCH] Fixed PMOD_EXPORTs.

Rev: src/bignum.h:1.30
Rev: src/compilation.h:1.32
Rev: src/dmalloc.h:1.59
Rev: src/dynamic_buffer.c:1.26
Rev: src/dynamic_buffer.h:1.21
Rev: src/fdlib.h:1.56
Rev: src/gc.c:1.276
Rev: src/object.h:1.92
Rev: src/pike_threadlib.h:1.59
---
 src/bignum.h         |  3 ++-
 src/compilation.h    |  4 ++--
 src/dmalloc.h        |  6 +++---
 src/dynamic_buffer.c |  4 ++--
 src/dynamic_buffer.h |  4 ++--
 src/fdlib.h          | 11 ++++++-----
 src/gc.c             |  6 +++---
 src/object.h         |  6 +++---
 src/pike_threadlib.h | 10 +++++-----
 9 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/src/bignum.h b/src/bignum.h
index d498d8165c..4e266fb2cc 100644
--- a/src/bignum.h
+++ b/src/bignum.h
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: bignum.h,v 1.29 2006/05/29 18:11:38 mast Exp $
+|| $Id: bignum.h,v 1.30 2006/07/05 02:17:09 mast Exp $
 */
 
 #include "global.h"
@@ -42,6 +42,7 @@
 #ifdef AUTO_BIGNUM
 
 /* Prototypes begin here */
+PMOD_EXPORT extern struct svalue auto_bignum_program;
 PMOD_EXPORT struct program *get_auto_bignum_program(void);
 PMOD_EXPORT struct program *get_auto_bignum_program_or_zero(void);
 void init_auto_bignum(void);
diff --git a/src/compilation.h b/src/compilation.h
index d46e304321..f310715baa 100644
--- a/src/compilation.h
+++ b/src/compilation.h
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: compilation.h,v 1.31 2004/03/13 14:45:05 grubba Exp $
+|| $Id: compilation.h,v 1.32 2006/07/05 02:17:09 mast Exp $
 */
 
 /*
@@ -50,7 +50,7 @@
 #define IMEMBER2(X,Y,Z,Q)
 #define ZMEMBER(X,Y,Z)
 #define ZMEMBER2(X,Y,Z,Q)
-#define SNAME(X,Y) extern struct X * Y;
+#define SNAME(X,Y) PMOD_EXPORT extern struct X * Y;
 #define SEND
 #endif
 
diff --git a/src/dmalloc.h b/src/dmalloc.h
index 65d085a90a..6a526b9723 100644
--- a/src/dmalloc.h
+++ b/src/dmalloc.h
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: dmalloc.h,v 1.58 2006/02/25 07:13:59 mast Exp $
+|| $Id: dmalloc.h,v 1.59 2006/07/05 02:17:09 mast Exp $
 */
 
 #ifndef DMALLOC_H
@@ -34,8 +34,8 @@ extern size_t dmalloc_tracelogptr;
 #endif /* DMALLOC_TRACE */
 
 #ifdef PIKE_DEBUG
-extern int gc_external_refs_zapped;
-void gc_check_zapped (void *a, TYPE_T type, const char *file, int line);
+PMOD_EXPORT extern int gc_external_refs_zapped;
+PMOD_EXPORT void gc_check_zapped (void *a, TYPE_T type, const char *file, int line);
 #endif
 
 #ifdef DO_PIKE_CLEANUP
diff --git a/src/dynamic_buffer.c b/src/dynamic_buffer.c
index 417f900d43..7e9b600fb8 100644
--- a/src/dynamic_buffer.c
+++ b/src/dynamic_buffer.c
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: dynamic_buffer.c,v 1.25 2004/09/18 20:50:48 nilsson Exp $
+|| $Id: dynamic_buffer.c,v 1.26 2006/07/05 02:17:09 mast Exp $
 */
 
 #include "global.h"
@@ -11,7 +11,7 @@
 #include "pike_error.h"
 #include "pike_memory.h"
 
-dynamic_buffer pike_global_buffer;
+PMOD_EXPORT dynamic_buffer pike_global_buffer;
 
 PMOD_EXPORT char *low_make_buf_space(size_t space, dynamic_buffer *buf)
 {
diff --git a/src/dynamic_buffer.h b/src/dynamic_buffer.h
index 863ba26d04..c155542dc8 100644
--- a/src/dynamic_buffer.h
+++ b/src/dynamic_buffer.h
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: dynamic_buffer.h,v 1.20 2004/11/05 19:47:37 grubba Exp $
+|| $Id: dynamic_buffer.h,v 1.21 2006/07/05 02:17:09 mast Exp $
 */
 
 #ifndef DYNAMIC_BUFFER_H
@@ -26,7 +26,7 @@ struct dynamic_buffer_s
 
 typedef struct dynamic_buffer_s dynamic_buffer;
 
-extern dynamic_buffer pike_global_buffer;
+PMOD_EXPORT extern dynamic_buffer pike_global_buffer;
 
 /* Prototypes begin here */
 PMOD_EXPORT char *low_make_buf_space(size_t space, dynamic_buffer *buf);
diff --git a/src/fdlib.h b/src/fdlib.h
index c4c429e3c2..458ce76aba 100644
--- a/src/fdlib.h
+++ b/src/fdlib.h
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: fdlib.h,v 1.55 2005/01/06 16:14:56 grubba Exp $
+|| $Id: fdlib.h,v 1.56 2006/07/05 02:17:09 mast Exp $
 */
 
 #ifndef FDLIB_H
@@ -428,9 +428,10 @@ typedef struct my_fd_set_s my_fd_set;
 #endif /* S_IFREG */
 #endif /* !S_ISREG */
 
-PMOD_PROTO extern int pike_make_pipe(int *fds);
-PMOD_PROTO extern int fd_from_object(struct object *o);
-PMOD_PROTO extern void create_proxy_pipe(struct object *o, int for_reading);
-PMOD_PROTO struct object *file_make_object_from_fd(int fd, int mode, int guess);
+PMOD_EXPORT int pike_make_pipe(int *fds);
+PMOD_EXPORT int fd_from_object(struct object *o);
+PMOD_EXPORT void create_proxy_pipe(struct object *o, int for_reading);
+PMOD_EXPORT struct object *file_make_object_from_fd(int fd, int mode, int guess);
+PMOD_EXPORT extern struct program *port_program;
 
 #endif /* FDLIB_H */
diff --git a/src/gc.c b/src/gc.c
index 33c0b69524..529cda439a 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: gc.c,v 1.275 2006/03/10 06:58:03 mast Exp $
+|| $Id: gc.c,v 1.276 2006/07/05 02:17:09 mast Exp $
 */
 
 #include "global.h"
@@ -350,7 +350,7 @@ const char *gc_found_place = NULL;
 #ifdef DO_PIKE_CLEANUP
 /* To keep the markers after the gc. Only used for the leak report at exit. */
 int gc_keep_markers = 0;
-int gc_external_refs_zapped = 0;
+PMOD_EXPORT int gc_external_refs_zapped = 0;
 #endif
 
 #ifdef PIKE_DEBUG
@@ -1706,7 +1706,7 @@ void exit_gc(void)
 }
 
 #ifdef PIKE_DEBUG
-void gc_check_zapped (void *a, TYPE_T type, const char *file, int line)
+PMOD_EXPORT void gc_check_zapped (void *a, TYPE_T type, const char *file, int line)
 {
   struct marker *m = find_marker (a);
   if (m && (m->flags & GC_CLEANUP_FREED))
diff --git a/src/object.h b/src/object.h
index 6355c0add5..503a3c8f94 100644
--- a/src/object.h
+++ b/src/object.h
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: object.h,v 1.91 2005/04/08 16:55:53 grubba Exp $
+|| $Id: object.h,v 1.92 2006/07/05 02:17:09 mast Exp $
 */
 
 #ifndef OBJECT_H
@@ -39,8 +39,8 @@ extern struct program *magic_set_index_program;
 extern struct program *magic_indices_program;
 extern struct program *magic_values_program;
 #ifdef DO_PIKE_CLEANUP
-extern int gc_external_refs_zapped;
-void gc_check_zapped (void *a, TYPE_T type, const char *file, int line);
+PMOD_EXPORT extern int gc_external_refs_zapped;
+PMOD_EXPORT void gc_check_zapped (void *a, TYPE_T type, const char *file, int line);
 #endif
 
 #define free_object(O) do{						\
diff --git a/src/pike_threadlib.h b/src/pike_threadlib.h
index be919980a4..72fd996627 100644
--- a/src/pike_threadlib.h
+++ b/src/pike_threadlib.h
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: pike_threadlib.h,v 1.58 2004/12/30 13:41:08 grubba Exp $
+|| $Id: pike_threadlib.h,v 1.59 2006/07/05 02:17:09 mast Exp $
 */
 
 #ifndef PIKE_THREADLIB_H
@@ -31,7 +31,7 @@
 #include <sys/types.h>
 #endif /* HAVE_SYS_TYPES_H */
 
-extern int threads_disabled;
+PMOD_EXPORT extern int threads_disabled;
 PMOD_EXPORT extern ptrdiff_t thread_storage_offset;
 PMOD_EXPORT extern struct program *thread_id_prog;
 
@@ -105,7 +105,7 @@ PMOD_EXPORT extern struct program *thread_id_prog;
 #endif /* FRAMEPOINTER_WAS_DEFINED */
 
 
-extern int num_threads;
+PMOD_EXPORT extern int num_threads;
 PMOD_EXPORT extern int live_threads, disallow_live_threads;
 struct object;
 PMOD_EXPORT extern size_t thread_stack_size;
@@ -662,7 +662,7 @@ PMOD_EXPORT extern const char msg_thr_swapped_over[];
      THREADS_FPRINTF(1, (stderr, "SWAP_OUT_CURRENT_THREAD() %s:%d t:%08x\n", \
 			 __FILE__, __LINE__, (unsigned int)_tmp->id))
 
-extern void debug_list_all_threads(void);
+PMOD_EXPORT extern void debug_list_all_threads(void);
 extern void dumpmem(const char *desc, void *x, int size);
 
 PMOD_EXPORT extern const char msg_saved_thread_id[];
@@ -761,7 +761,7 @@ PMOD_EXPORT extern const char msg_thr_states_mixed[];
 PMOD_EXPORT extern const char msg_thr_allow_in_gc[];
 PMOD_EXPORT extern const char msg_thr_allow_in_disabled[];
 PMOD_EXPORT extern const char msg_global_dynbuf_in_use[];
-extern dynamic_buffer pike_global_buffer;
+PMOD_EXPORT extern dynamic_buffer pike_global_buffer;
 #if defined(__ia64) && defined(__xlc__)
 /* Workaround for a code generation bug in xlc 5.5.0.0/ia64 . */
 #define DO_IF_NOT_XLC_IA64(X)
-- 
GitLab