delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/17/16:00:48

From: "Trond Erik Bones" <trondb AT nospam DOT stud DOT iet DOT hist DOT no>
Newsgroups: comp.os.msdos.djgpp
Subject: fopen on binary files - dialect differensies ?
Date: Tue, 17 Mar 1998 18:12:30 +0100
Organization: TISIP
Lines: 27
Message-ID: <6emaud$9d8$1@pravda.tisip.no>
NNTP-Posting-Host: stu172.stud.iet.hist.no
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi,

I am working on a program  which was originally written for UNIX GNU. When compiling in Win95(with GPP and MAKE) I got an error msg that stated that something was wrong with an attempt to open and read a binary file.

I then tried to compile it with MSVC ver 5.0. Same result !!

I used the debugger in MSVC and eventually found out that in UNIX you don't have to specify that the file you are going to open is a binary file. So I added the "b"(it wasn't there) option in the fopen command, and the program works !!

But when I changed the same fopen command and compiled the program using GNU GPP and MAKE I got the same result as before !

Why can that be ?
Does GNU have another dialect that I don't know of ?

I don't have access to this newsgroup regulary so I'll be glad if you also replyed på e-mail !

Best regards

Trond Erik Bones

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019