ICU-3389 Fix the case when newline translation is or is not used.

X-SVN-Rev: 14734
This commit is contained in:
George Rhoten 2004-03-23 06:46:35 +00:00
parent 6038ee28f5
commit ff7f72151c
3 changed files with 5 additions and 5 deletions

View File

@ -639,7 +639,7 @@ ConvertFile::convertFile(const char *pname,
} else {
infilestr = "-";
infile = stdin;
#ifdef WIN32
#if defined(WIN32) || defined(U_CYGWIN)
if (setmode(fileno(stdin), O_BINARY) == -1) {
initMsg(pname);
u_wmsg(stderr, "cantSetInBinMode");
@ -1340,7 +1340,7 @@ main(int argc, char **argv)
} else {
outfilestr = "-";
outfile = stdout;
#ifdef WIN32
#if defined(WIN32) || defined(U_CYGWIN)
if (setmode(fileno(outfile), O_BINARY) == -1) {
u_wmsg(stderr, "cantSetOutBinMode");
exit(-1);

View File

@ -348,7 +348,7 @@ static void TestUDataSetAppData(){
log_verbose("Testing udata_setAppData() with %s\n", filePath);
#ifdef WIN32
#if defined(WIN32) || defined(U_CYGWIN)
fileHandle = open( filePath, O_RDONLY | O_BINARY );
#else
fileHandle = open( filePath, O_RDONLY);
@ -377,7 +377,7 @@ static void TestUDataSetAppData(){
i = read(fileHandle, fileBuf, fileSize);
if (i != fileSize) {
log_err("FAIL: TestUDataSetAppData() error reading file \"%s\".\n", filePath);
log_err("FAIL: TestUDataSetAppData() error reading file \"%s\" size=%d read=%d.\n", filePath, fileSize, i);
goto cleanupAndReturn;
}

View File

@ -273,7 +273,7 @@ main(int argc, char* argv[]) {
if (tostdout) {
out = stdout;
#ifdef WIN32
#if defined(WIN32) || defined(U_CYGWIN)
if (_setmode(_fileno(out), _O_BINARY) == -1) {
fprintf(stderr, "%s: couldn't set standard output to binary mode\n, pname");
return 4;