Yang Tse wrote:
2009/6/4, John E. Malmberg <[email protected]>:
This fixes an existing bug in urlglob.c where it was not converting the Curl
Unix exit code to a VMS DCL compatible exit code.  This fix required the
enhancement described next.

This also adds an enhancement to main.c so that when curl is run under a
Unix shell like Bash on VMS, it will return the standard Unix exit codes and
messages.

I introduced os-specific.c and os-specific.h for use in curl tool code
and adjusted your patch to use these new files.

Verify if everything works as intended.on VMS.

It caused some duplicate symbol warnings.

This patch against the 7.19.6-20090609 daily snapshot makes things work.

Regards,
-John
[email protected]
Personal Opinion Only
--- /src_root/curl-7.19.6-daily/packages/vms/curlmsg_vms.h      Wed Sep  3 
21:00:13 2008
+++ packages/vms/curlmsg_vms.h  Tue Jun  9 01:27:48 2009
@@ -7,8 +7,16 @@
 /*                                                                          */
 /* If you update CURLMSG.MSG make sure to update this file to match.        */
 /*                                                                          */
+
+/* The MODULE_OS_SPECIFC sections are only used by os-specific.c */
+/* And must not be public to other modules to prevent duplicate symbols */
+
+#ifdef MODULE_OS_SPECIFIC
+     int vms_show = 0;
 #include "curlmsg.h"
-int       vms_show = 0;
+#else
+     extern int vms_show;
+#endif
 /*
 #define   FAC_CURL      0xC01
 #define   FAC_SYSTEM    0
@@ -20,10 +28,11 @@
 #define   SEV_WARNING   0
 #define   SEV_SUCCESS   1
 #define   SEV_ERROR     2
-#define   SEV_INFO      3   
+#define   SEV_INFO      3
 #define   SEV_FATAL     4
 */
-long vms_cond[] = 
+#ifdef MODULE_OS_SPECIFIC
+static const long vms_cond[] =
         {
         CURL_OK,
        CURL_UNSUPPORTED_PROTOCOL,
@@ -111,3 +120,4 @@
        CURLE_SSL_ISSUER_ERROR,
         CURL_CURL_LAST
         };
+#endif
--- /src_root/curl-7.19.6-daily/src/main.c      Mon Jun  8 21:00:17 2009
+++ src/main.c  Tue Jun  9 23:56:29 2009
@@ -114,10 +114,6 @@
 #include <netinet/tcp.h> /* for TCP_KEEPIDLE, TCP_KEEPINTVL */
 #endif
 
-#ifdef __VMS
-#  include "curlmsg_vms.h"
-#endif
-
 #include "os-specific.h"
 
 /* The last #include file should be: */
--- /src_root/curl-7.19.6-daily/src/os-specific.c       Fri Jun  5 11:14:50 2009
+++ src/os-specific.c   Tue Jun  9 01:26:49 2009
@@ -25,7 +25,8 @@
 #include <curl/curl.h>
 
 #ifdef __VMS
-#  include "curlmsg_vms.h"
+#  define MODULE_OS_SPECIFIC 1
+   int vms_show;
 #endif
 
 #define ENABLE_CURLX_PRINTF
@@ -39,7 +40,10 @@
 
 #ifdef __VMS
 
-int vms_shell = -1;
+void decc$__posix_exit(int __status);
+void decc$exit(int __status);
+
+static int vms_shell = -1;
 
 /* VMS has a DCL shell and and also has Unix shells ported to it.
  * When curl is running under a Unix shell, we want it to be as much
--- /src_root/curl-7.19.6-daily/src/os-specific.c       Fri Jun  5 11:14:50 2009
+++ src/os-specific.c   Tue Jun  9 01:26:49 2009
@@ -25,7 +25,8 @@
 #include <curl/curl.h>
 
 #ifdef __VMS
-#  include "curlmsg_vms.h"
+#  define MODULE_OS_SPECIFIC 1
+   int vms_show;
 #endif
 
 #define ENABLE_CURLX_PRINTF
@@ -39,7 +40,10 @@
 
 #ifdef __VMS
 
-int vms_shell = -1;
+void decc$__posix_exit(int __status);
+void decc$exit(int __status);
+
+static int vms_shell = -1;
 
 /* VMS has a DCL shell and and also has Unix shells ported to it.
  * When curl is running under a Unix shell, we want it to be as much

Reply via email to