Author Topic: Latest FluffOS under cygwin errors  (Read 1494 times)

Offline beren

  • Acquaintance
  • *
  • Posts: 17
    • View Profile
    • http://midnightsun2.org:3328
Latest FluffOS under cygwin errors
« on: October 26, 2014, 03:40:14 AM »
Under cygwin (64 & 32 bit alike) I get the following error

In file included from std.h:20:0,
                 from efuns_port.cc:10:
efuns_port.cc: In function ‘void f_oldcrypt()’:
macros.h:186:34: error: ‘crypt’ was not declared in this scope
 #define OLDCRYPT(x, y) crypt(x, y)
                                  ^
macros.h:159:43: note: in definition of macro ‘string_copy’
 #define string_copy(x, y) int_string_copy(x)
                                           ^
efuns_port.cc:68:21: note: in expansion of macro ‘OLDCRYPT’
   res = string_copy(OLDCRYPT(sp->u.string, salt), "f_crypt");

under linux (fedora) it compiles without problems so I suppose this is something cygwin specific.
Any ideas why this should be ?
Midnight Sun - http://midnightsun2.org:3328

Once you enter a land where even the sun
does not go to sleep at night... will you?

Offline quixadhal

  • BFF
  • ***
  • Posts: 618
    • View Profile
    • A Waste of Time
Re: Latest FluffOS under cygwin errors
« Reply #1 on: October 27, 2014, 07:14:18 AM »
Because cygwin is horrible and nobody should allow their worse enemy to use it, when they could just download virtualbox and run a linux VM on their windows machine instead?

But...

Clearly, the system call crypt() is not recognized, so cygwin must include it in a different place than a unix system does.  I would guess you'd need to figure out which include file crypt() lives in for cygwin and #include that.

Offline beren

  • Acquaintance
  • *
  • Posts: 17
    • View Profile
    • http://midnightsun2.org:3328
Re: Latest FluffOS under cygwin errors
« Reply #2 on: October 27, 2014, 09:52:09 AM »
Yes cygwin is horrible and real developers use butterflies and all that jazz BUT sometimes you do have to work with the tools you are given even if you hate them.

The problem is that crypt and crypt.h are where they always were in cygwin.
Previous versions of FluffOS still compile and run with out such problems (on the same machine the latest version fails)
and as far as I could see nothing changed concerning crypt that should cause the problem and yet the compile errors exist.

Anyways will go through the code again and see if I can fix it.


« Last Edit: October 27, 2014, 09:55:45 AM by beren »
Midnight Sun - http://midnightsun2.org:3328

Once you enter a land where even the sun
does not go to sleep at night... will you?

Offline FallenTree

  • BFF
  • ***
  • Posts: 476
    • View Profile
Re: Latest FluffOS under cygwin errors
« Reply #3 on: October 28, 2014, 07:36:33 PM »
cygwin is not that horrible.  That's actually this 1 issue left over for me to solve before getting it work, I will submit a fix later today.

Cheers.

Offline FallenTree

  • BFF
  • ***
  • Posts: 476
    • View Profile
Re: Latest FluffOS under cygwin errors
« Reply #4 on: October 28, 2014, 10:17:02 PM »
The issue has been fixed at head: it's a rather stupid issue. adding -I. cause <crypt.h> to match against "crypt.h", switching to -iquote. fixed the issue.