int c = '*';
size_t n;
+#ifdef NETWARE
+ /*
+ c != 4 check is there as fread of a character in NetWare LibC gives 4 upon ^D character.
+ Ascii value 4 is actually EOT character which is not defined anywhere in the LibC
+ or else we can use instead of hardcoded 4.
+ */
+ for ( n = 0; n < len && (c = zend_stream_getc( file_handle TSRMLS_CC)) != EOF && c != 4 && c != '\n'; ++n )
+#else
for ( n = 0; n < len && (c = zend_stream_getc( file_handle TSRMLS_CC)) != EOF && c != '\n'; ++n )
+#endif
buf[n] = (char) c;
if ( c == '\n' )
buf[n++] = (char) c;