bug-gnucobol
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-GnuCOBOL] COBC -X


From: James K. Lowden
Subject: Re: [Bug-GnuCOBOL] COBC -X
Date: Sat, 31 Mar 2018 10:57:11 -0400

On Fri, 30 Mar 2018 06:39:35 +0800
Jonathan Ras <address@hidden> wrote:

> address@hidden /c/gnucobol/pgms
> $ cobc -x
> configuration error:
> /mingw/share/gnu-cobol/config\default.conf: No such file or directory
...
> COB_CONFIG_DIR           : /mingw/share/gnu-cobol/config

In common.h we find: 

#ifndef _WIN32 /* note: needs to be \ for MinGW, needed for cobc -j */ 
#define SLASH_CHAR      (char) '/'
#define SLASH_STR       (char *) "/"
#else
#define SLASH_CHAR      (char) '\\'
#define SLASH_STR       (char *) "\\"
#endif

Except for display purposes, most of the machinations with backslashes
in the compiler are unnecessary.  You seem to have happened on a case
where it's both unnecessary and harmful.  Eyeballing the code, it looks
like the problem manifests in cb_load_conf_file or
cob_load_config_file.  

It's a common misconception that pathnames in Windows must be
backslashes.  Although the user interface uses backslashes, the Windows
C standard library accepts either forward or backslashes. It's
perfectly fine to hand Posix-style pathnames to a Windows function.  

--jkl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]