[omniORB] GCC-2.95.1 error: stray '\' in program

Duncan Grisby dgrisby@uk.research.att.com
Mon, 11 Oct 1999 16:29:55 +0100


On Monday 11 October, "Smith, Norman" wrote:

> We've had some strange behavior due to differences with line termination
> characters between NT and unix (i.e. <CR><LF> vs. <LF> on unix), such as
> when trying to use CVS on NT, but the repository is on a unix mapped drive.
> We are using WinCVS on NT as a GUI front-end to CVS, so I don't know if the
> problem lies within WinCVS or CVS itself. The extra carriage return would be
> a hidden character, and would always be at the end of the line (i.e. past
> the '\' at the end of each line).

The problem is indeed to do with line endings. CVS on Windows does the
right thing, and converts Unix-style \n line endings in the repository
into DOS-style \r\n endings. It looks from Rosimildo's errors as
though GCC 2.95 on Windows expects Unix-style line endings. I would
consider this a bug in GCC.

You can workaround the problem by specifying the -kb flag to the
checkout operation, like

  cvs -d :pserver:anonymous@cvs.uk.research.att.com:/cvsroot co -kb omni

This treats all files as binary, and so doesn't convert line endings.
Unfortunately, some Windows applications will be upset with the Unix
line endings.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --