djgpp: Fixed compiler warnings/errors when compiling with DJGPP

This commit is contained in:
Daniel Marjamäki 2008-08-30 16:38:56 +00:00
parent 3daf128c0f
commit 0e267441de
2 changed files with 7 additions and 9 deletions

View File

@ -35,6 +35,7 @@
#include <dir.h>
#else
#include <glob.h>
#include <unistd.h>
#endif
//---------------------------------------------------------------------------
@ -92,22 +93,19 @@ static void RecursiveAddFiles( std::vector<std::string> &filenames, const char p
#else
// gcc / cygwin..
glob_t glob_results;
#ifdef __GNUC__
// gcc..
glob("*", GLOB_ONLYDIR, 0, &glob_results);
#else
// cygwin..
glob("*", 0, 0, &glob_results);
#endif
glob("*", GLOB_MARK, 0, &glob_results);
for ( unsigned int i = 0; i < glob_results.gl_pathc; i++ )
{
const char *dirname = glob_results.gl_pathv[i];
if ( dirname[0] == '.' )
continue;
if ( strchr(dirname, '/') == 0 )
continue;
chdir( dirname );
std::ostringstream curdir;
curdir << path << dirname << "/";
curdir << path << dirname;
RecursiveAddFiles( filenames, curdir.str().c_str() );
chdir( ".." );
}

View File

@ -683,7 +683,7 @@ void SimplifyTokenList()
free(tok->str);
char str[10];
// 'sizeof(type *)' has the same size as 'sizeof(char *)'
sprintf( str, "%d", sizeof(char *));
sprintf( str, "%lu", sizeof(char *));
tok->str = strdup( str );
for (int i = 0; i < 4; i++)