INTEGRATION: CWS os2port01 (1.19.10); FILE MERGED

2007/07/18 12:09:11 obr 1.19.10.2: RESYNC: (1.19-1.20); FILE MERGED
2006/12/28 15:00:29 ydario 1.19.10.1: OS/2 initial import.
This commit is contained in:
Vladimir Glazounov 2007-09-20 14:01:19 +00:00
parent 391d45610c
commit 310e841c24

View file

@ -4,9 +4,9 @@
*
* $RCSfile: idlccompile.cxx,v $
*
* $Revision: 1.20 $
* $Revision: 1.21 $
*
* last change: $Author: obo $ $Date: 2006-09-17 08:14:30 $
* last change: $Author: vg $ $Date: 2007-09-20 15:01:19 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -168,7 +168,7 @@ OString makeTempName(const OString& prefix)
if ( uTmpPath.getLength() )
tmpPath = OUStringToOString(uTmpPath, RTL_TEXTENCODING_UTF8);
#if defined(SAL_W32) || defined(SAL_UNX)
#if defined(SAL_W32) || defined(SAL_UNX) || defined(SAL_OS2)
OSL_ASSERT( sizeof(tmpFilePattern) > ( strlen(tmpPath)
+ RTL_CONSTASCII_LENGTH(
@ -197,10 +197,6 @@ OString makeTempName(const OString& prefix)
#endif
#endif
#ifdef __OS2__
strncpy(tmpFilePattern, tempnam(NULL, prefix.getStr()), sizeof(tmpFilePattern)-1);
#endif
return OString(tmpFilePattern);
}
@ -322,7 +318,22 @@ sal_Int32 compileFile(const OString * pathname)
idlc()->getOptions()->getProgramName().getStr(), cmdFileName.getStr());
exit(99);
}
#ifdef SAL_OS2
char* tok = strtok( (char*)cppArgs.getStr(), " \t\n\r");
while( tok) {
if (tok[strlen(tok)-1] == '\"')
tok[strlen(tok)-1] = '\0';
if (*tok == '\"')
memcpy( tok, tok+1, strlen(tok));
if (strlen(tok)>0) {
fputs(tok, pCmdFile);
fputc('\n', pCmdFile);
}
tok = strtok( NULL, " \t\n\r");
}
#else
fprintf(pCmdFile, "%s", cppArgs.getStr());
#endif
fclose(pCmdFile);
OUString cmdArg(RTL_CONSTASCII_USTRINGPARAM("@"));