This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Compile-time detection of EOL translation mode (CLISP)

From within the C preprocessor, how do I find out whether a
Cygwin installation is set to use dos or unix EOLs?

The reason I ask is this:  I'm using version 2.41 as
downloaded from a Cygwin mirror, and my
*default-file-encoding* uses dos-style line terminators

 [1]> *default-file-encoding*

even though my Cygwin installation is set to use unix ones.
With help from comp.lang.lisp, I found that this is set in

  #if defined(WIN32) || (defined(UNIX) && (O_BINARY != 0))
   pushSTACK(S(Kdos));           /* :line-terminator */
   pushSTACK(S(Kunix));          /* :line-terminator */

Specifically, O_BINARY is 0x10000 (even though it should
have no effect on my Cygwin installation).

I kluged around this by using "#if 0", but it really should
look at the Cygwin installation's EOL setting.  How can this
be done?  (Perhaps check the CYGWIN environment variable in
the makefile?)

(The reason CLISP doesn't just open files in text mode is
that it does its own EOL translation, controllable at



-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]