public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* problem with mounting / as binary or not
@ 1997-08-28  7:18 Hubert FAUQUE
  1997-09-04 12:06 ` Paul Vincent Elia
  0 siblings, 1 reply; 3+ messages in thread
From: Hubert FAUQUE @ 1997-08-28  7:18 UTC (permalink / raw)
  To: gnu-win32

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




-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with mounting / as binary or not
  1997-08-28  7:18 problem with mounting / as binary or not Hubert FAUQUE
@ 1997-09-04 12:06 ` Paul Vincent Elia
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Vincent Elia @ 1997-09-04 12:06 UTC (permalink / raw)
  To: Hubert FAUQUE, gnu-win32

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 <file_with_DOS_CRLFs> . 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 <fcntl.h>
#include <stdio.h>

#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 <file_with_DOS_CRLFs>\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<read_size;i++) if (buffer[i]!='\015') buffer2[j++]=buffer[i];
write(out_file,buffer2,(unsigned int)j);

}

close(in_file);
close(out_file);
remove(argv[1]);
rename(TEMPFILE,argv[1]);
return(0);
}
---
--
Paul V. Elia, President, IT Atlanta, Inc., Information Technology Consultants

(404) 467-8485    fax: (404) 846-9124    http://www.itatlanta.com - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* problem with mounting / as binary or not
@ 1997-08-25  6:36 Hubert FAUQUE
  0 siblings, 0 replies; 3+ messages in thread
From: Hubert FAUQUE @ 1997-08-25  6:36 UTC (permalink / raw)
  To: gnu-win32

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




-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-09-04 12:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-28  7:18 problem with mounting / as binary or not Hubert FAUQUE
1997-09-04 12:06 ` Paul Vincent Elia
  -- strict thread matches above, loose matches on Subject: below --
1997-08-25  6:36 Hubert FAUQUE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).