From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Vincent Elia To: hubert.fauque@wanadoo.fr (Hubert FAUQUE), gnu-win32@cygnus.com Subject: Re: problem with mounting / as binary or not Date: Thu, 04 Sep 1997 12:06:00 -0000 Message-id: <3.0.3.32.19970831172113.006b55f8@pop.mindspring.com> References: <3405e496.230818880@smtp.wanadoo.fr> X-SW-Source: 1997-09/msg00077.html At 12:04 PM 8/28/97 GMT, Hubert FAUQUE wrote: > >I have installed Sergey's cygwin.dll and bash and I am having a >problem: >bash didn't find .bashrc at startup, so as I have seen on a previous >message I have mounted c: as / with text=binary and it works for bash; >but now is the problem: make doesn't find any include files; >if there is > include file >in the Makefile, >it gives the message > file^M: no such file or directory >it doesn't find the file because it adds a ^M at the end of the name; > >Has anybody found a solution? > >thanks > >Hubert > > I know this isn't the best solution, but it may help. I wrote a simple program (makeunix) that converts all CRLF to LF in the supplied text file. Syntax: makeunix . It outputs to a tempfile (same name always), deletes the original file, and renames the tempfile back to the original filename. I've needed it for other reasons and it has worked fine. --- #include #include #define TEMPFILE "./~fix.tmp" const int BUFFER_SIZE = (16 * 1024); main (int argc, char *argv[]) { char buffer[BUFFER_SIZE]; char buffer2[BUFFER_SIZE]; int i, j, in_file, out_file, read_size; if (argc != 2) { printf("Usage: makeunix \n"); exit(8); } in_file = open(argv[1],O_RDONLY); if (in_file<0) { printf("Error: Could not open input file %s\n",argv[1]); exit(8); } out_file = open(TEMPFILE,O_BINARY|O_WRONLY|O_TRUNC|O_CREAT,0644); if (out_file<0) { printf("Error: Could not create temporary output file\n"); exit(8); } while(1) { read_size = read(in_file,buffer,sizeof(buffer)); if (read_size==0) break; // End of file if (read_size<0) { printf("Error: Problem reading from input file %s\n", argv[1]); exit(8); } for (i=j=0;i