Project

General

Profile

Bug #8597

No getline() on Snow Leopard

Added by jhegeman - about 7 years ago. Updated about 7 years ago.

Status:
Fixed
Priority:
High
Assignee:
-
Category:
General
Target version:
Start date:
Due date:
% Done:

100%

Affected Version:
System:
bitness:
64-bit
hardware architecture:
amd64/x86

Description

It appears the current master does not build on OS X Snow Leopard since there getline() is missing. (Lion seems to have it? Can't check, since I'm still on SL.)

So one ends up with something like:

In file included from /Users/jhegeman/tmp/tmp_darktable/darktable/src/common/image.h:24,
                 from /Users/jhegeman/tmp/tmp_darktable/darktable/src/common/exif.h:22,
                 from /Users/jhegeman/tmp/tmp_darktable/darktable/src/common/exif.cc:26:
/Users/jhegeman/tmp/tmp_darktable/darktable/src/common/darktable.h: In function 'void dt_print_mem_usage()':
/Users/jhegeman/tmp/tmp_darktable/darktable/src/common/darktable.h:254: error: 'getline' was not declared in this scope
maker2: *** [src/CMakeFiles/lib_darktable.dir/common/exif.cc.o] Error 1

I'm now trying to come up with a (bit of a kludgy) solution based on the getline() implementation I found here: http://stackoverflow.com/questions/4160353/getline-on-macosx-10-6-crashing-c-compiler

Unless people have better ideas? I guess copying the GNU version is not allowed, and actually I'm not too sure I'm allowed to just copy-paste the SE solution either. Suggestions?

Thanks!
Jeroen

History

#1 Updated by Simon Spannagel about 7 years ago

Hi Jeroen,

is this connected to your fix in git master:

commit ca87ead859c7ee96d61bbb4c735b90e8144b7b0b
Date: Sun Mar 18 11:59:24 2012 +0100
Adding flag to prevent inclusion of private dprintf on OS X Lion.

or something different?

#2 Updated by jhegeman - about 7 years ago

  • Status changed from New to Fixed

Hi,

This was unrelated, and has in the meantime be fixed in a nicer way by Amnon.

Cheers,
Jeroen

Also available in: Atom PDF