develooper Front page | perl.perl5.porters | Postings from March 2000

[PATCH 5.5.670] circumvent VMS fileno bug in old DEC C version

From:
Craig A. Berry
Date:
March 6, 2000 13:37
Subject:
[PATCH 5.5.670] circumvent VMS fileno bug in old DEC C version
Message ID:
4.2.2.20000306153539.00ca6420@exchi01.midwest.metamorgs.com
The patch fixes a mysterious crashing bug observed in the filehandle tests 
when building with DEC C 5.2 (but not later versions).  The patch disables 
the fileno macro, thus forcing use of the run-time function rather 
than the broken in-line code generated by the compiler.  This workaround is 
documented in the DEC C RTL manual at:

<http://www.openvms.digital.com/commercial/c/5763p025.htm#index_x_720>

BTW, this is based on Charles Bailey's vmsperl_pre56_3 test kit.

--- vms/vmsish.h;-0     Thu Mar  2 20:25:05 2000
+++ vms/vmsish.h        Mon Mar  6 15:12:10 2000
@@ -717,4 +717,9 @@
  #undef HAS_NTOHL
  #endif
  
+/* The C RTL manual says to undef the macro for DEC C 5.2 and lower. */
+#if defined(fileno) && defined(__DECC_VER) && __DECC_VER < 50300000
+#  undef fileno 
+#endif 
+
  #endif  /* __vmsish_h_included */
End of Patch. 
_______________________________________________
Craig A. Berry                                   
mailto:craig.berry@metamorgs.com




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About