Hi Jeff,
Here are the diffs of the files I've modified, hopefully that's what you're
after :)
--- ARSperl-1.93.orig/supportrev.h Thu Apr 2 19:57:04 2009
+++ ARSperl-1.93/supportrev.h Thu Mar 8 16:30:33 2012
@@ -111,6 +111,10 @@
EXTERN int strncasecmp(char *s1, char *s2, size_t n);
+#endif /* def _WIN32 */
+
+#if defined(_WIN32)
+
EXTERN char* arsperl_strdup( char *s1 );
#define strdup arsperl_strdup
--- ARSperl-1.93.orig/supportrev.c Thu Apr 2 19:57:03 2009
+++ ARSperl-1.93/supportrev.c Thu Mar 8 16:31:18 2012
@@ -2674,6 +2674,10 @@
return (i == n)? 0 : *p1 - *p2;
}
+#endif
+
+#if defined(_WIN32)
+
char*
arsperl_strdup( char *s1 ){
char *p1;
Hi Matt,
With these changes applied to the source, then it's just a matter of running
through the normal compile process. If you'd still rather have one ready-made,
then let me know which version of Strawberry perl and Remedy you're using and I
can put something together for you.
Regards,
Glyn
From: [email protected]
Date: Wed, 14 Mar 2012 13:36:40 -0400
To: [email protected]
Subject: Re: [Arsperl-users] ARSPerl 1.93 fix for crash with Windows 7 and 2008
On Mar 14, 2012, at 1:00 PM, Smith, Matthew (Produban) wrote:
Well done Glyn,
Any chance I can get hold of the compiled modules?
In addition, a patch (or description of which lines you changed, etc, to make
it work on Windows) would be awesome!
jeff
What you describe would be beyond me!
Thanks
Matt…
Matthew Smith | Technical Support Analyst, Automation,Monitoring | Produban UK
Commercial
From: Glyn Davies [mailto:[email protected]]
Sent: 14 March 2012 16:02
To: [email protected]
Subject: [Arsperl-users] ARSPerl 1.93 fix for crash with Windows 7 and 2008
Just wanted to report a fix I found for an issue I was having with ARSperl
running on Windows 7 and 2008.
I compiled the module using Strawberry Perl with the 7.6.4 version of the
Remedy API, and found that test scripts would run as expected on Windows XP or
2003, but that perl would crash on Windows 7 or 2008 reporting an issue with
ntdll.dll. I tried different versions of the Remedy API, but hit the same
problem.
The crash would occur when trying to use the ars_setEntry function, but would
only occur when using string fields, not numerical fields.
Looking through the source, I tracked down the issue to the sv_to_ARValue, and
specifically the use of strdup. It seems that some functionality has changed in
Windows somewhere that means when strdup is allocating memory, it's not
creating it on general heap? That's all I can assume, as when the code hit the
call to FreeARFieldValueList, that's when the crash would actually occur.
The workaround has been to update the supportrev.h and supportrev.c files to
ensure that the arsperl_strdup function is available when compiling on Windows,
not just when compiling on Windows with a non-GNU C compiler. As the
arsperl_strdup function then replaces strdup, this fixed the problem, and
scripts using ars_SetEntry (ars_CreateEntry and ars_MergeEntry would be
affected too by the looks of it) now work correctly on all version of Windows
that I've been able to test on.
Just wanted to pass this on in case it will help others who hit the same
problem!
Regards,
GlynEmails aren't always secure, and they may be intercepted or changed
after they've been sent. Produban doesn't accept liability if this
happens. If you think someone may have interfered with this email,
please get in touch with the sender another way. This message and any
documents attached to it do not create or change any contract unless
otherwise specifically stated. Any views or opinions contained in this
message are solely those of the author, and do not necessarily represent
those of Produban, unless otherwise specifically stated and the sender
is authorised to do so. Produban doesn't accept responsibility for
damage caused by any viruses contained in this email or its attachments.
Emails may be monitored. If you've received this email by mistake,
please let the sender know at once that it's gone to the wrong person
and then destroy it without copying, using, or telling anyone about its
contents. Produban Servicios Informaticos Generales, S.L. (UK Branch).
Registered office: Shenley Wood House, Chalkdell Drive, Shenley Wood,
Milton Keynes MK5 6LA. Branch registration number BR 008486.
Ref:[PDB#014]
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
--
Arsperl-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/arsperl-users
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes
use of virtualization - but cloud computing also focuses on allowing computing
to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/
-- Arsperl-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/arsperl-users
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
--
Arsperl-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/arsperl-users