mirror of http://shamusworld.gotdns.org/git/rln
Fix to test to see if include paths actually exist.
RLN will now yell at you if you give it an include path that doesn't exist. Thanks to ggn for the idea! :-)
This commit is contained in:
parent
fd9ba5f319
commit
bd10a921a7
15
rln.c
15
rln.c
|
@ -3115,6 +3115,21 @@ int main(int argc, char * argv[])
|
|||
ExitLinker();
|
||||
}
|
||||
|
||||
// Check to see if include paths actually exist
|
||||
if (strlen(libdir) > 0)
|
||||
{
|
||||
DIR * test = opendir(libdir);
|
||||
|
||||
if (test == NULL)
|
||||
{
|
||||
printf("Invalid include path: %s\n", libdir);
|
||||
errflag = 1;
|
||||
ExitLinker();
|
||||
}
|
||||
|
||||
closedir(test);
|
||||
}
|
||||
|
||||
if (!zflag && !vflag)
|
||||
{
|
||||
ShowVersion(); // Display version information
|
||||
|
|
3
rln.h
3
rln.h
|
@ -44,7 +44,7 @@
|
|||
|
||||
#define MAJOR 1 // Major version number
|
||||
#define MINOR 6 // Minor version number
|
||||
#define PATCH 2 // Patch release number
|
||||
#define PATCH 3 // Patch release number
|
||||
|
||||
#ifdef WIN32
|
||||
#define PLATFORM "Win32" // Release platform - Windows
|
||||
|
@ -81,6 +81,7 @@
|
|||
// Rather than rely on dodgy compilers for something that's now a C99 standard,
|
||||
// let's do this:
|
||||
#include <stdint.h>
|
||||
#include <dirent.h>
|
||||
|
||||
struct OHEADER
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue