This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Missing dllimport's in <error.h>


The attached patch for HEAD is required for compiling code which uses
<error.h> and -Wl,--disable-auto-import.


Yaakov
2013-02-20  Yaakov Selkowitz  <yselkowitz@...>

	* include/error.h (error_message_count): Declare as dllimport.
	(error_one_per_line): Ditto.
	(error_print_progname): Ditto.

Index: include/error.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/error.h,v
retrieving revision 1.1
diff -u -p -r1.1 error.h
--- include/error.h	18 May 2011 01:25:41 -0000	1.1
+++ include/error.h	21 Feb 2013 02:33:32 -0000
@@ -19,9 +19,15 @@ extern "C"
 void error (int, int, const char *, ...);
 void error_at_line (int, int, const char *, unsigned int, const char *, ...);
 
+#ifdef  __INSIDE_CYGWIN__
 extern unsigned int error_message_count;
 extern int error_one_per_line;
 extern void (*error_print_progname) (void);
+#else
+extern __declspec(dllimport) unsigned int error_message_count;
+extern __declspec(dllimport) int error_one_per_line;
+extern __declspec(dllimport) void (*error_print_progname) (void);
+#endif
 
 #ifdef __cplusplus
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]