Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lftp

7 views
Skip to first unread message

Tellerbop

unread,
Feb 3, 2009, 1:37:19 AM2/3/09
to
Hoi,
Try to port Lftp but it fails with the make:
Use Gcc 4.33

In file included from ../lib/unistd.h:27,
from ../lib/unistd.h:27,
from log.h:26,
from FileAccess.cc:36:
U:/USR/include/unistd.h:476: error: declaration of C function 'void*
sbrk(gl_intptr_t)' conflicts with
U:/USR/include/stdlib.h:387: error: previous declaration 'void*
sbrk(intptr_t)' here
U:/USR/include/unistd.h:650: error: declaration of C function 'void*
_sbrk(gl_intptr_t)' conflicts with
U:/USR/include/stdlib.h:416: error: previous declaration 'void*
_sbrk(intptr_t)' here

Any idea
--
With the best regards from the Netherlands,

KO Myung-Hun

unread,
Feb 3, 2009, 9:11:50 AM2/3/09
to
Hi/2.

My 'unistd.h' does not have sbrk() and _sbrk() with 'gl_intptr_t' as a
argument type.

And what is '../lib/unistd.h' ? It's from Lftp package ?

I think your configuration for gcc 4.3.3 is messed up more or less, and
have a conflict with unistd.h of Lftp.

--
KO Myung-Hun

Using Mozilla SeaMonkey 1.1.14
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1 GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

Tellerbop

unread,
Feb 3, 2009, 11:00:11 AM2/3/09
to
Hello KO,

On Tue, 3 Feb 2009 14:11:50 UTC, KO Myung-Hun <ko...@chollian.net>
wrote:

> Hi/2.
>
> Tellerbop wrote:
> > Hoi,
> > Try to port Lftp but it fails with the make:
> > Use Gcc 4.33
> >
> > In file included from ../lib/unistd.h:27,
> > from ../lib/unistd.h:27,
> > from log.h:26,
> > from FileAccess.cc:36:
> > U:/USR/include/unistd.h:476: error: declaration of C function 'void*
> > sbrk(gl_intptr_t)' conflicts with
> > U:/USR/include/stdlib.h:387: error: previous declaration 'void*
> > sbrk(intptr_t)' here
> > U:/USR/include/unistd.h:650: error: declaration of C function 'void*
> > _sbrk(gl_intptr_t)' conflicts with
> > U:/USR/include/stdlib.h:416: error: previous declaration 'void*
> > _sbrk(intptr_t)' here
> >
> > Any idea
> >
>

This is the unistd.h i have ł 23.913ł21-07-07

> My 'unistd.h' does not have sbrk() and _sbrk() with 'gl_intptr_t' as a
> argument type.

I commit out the both _sbrk lines and now it goes behind those errors.

> And what is '../lib/unistd.h' ? It's from Lftp package ?

Yes

> I think your configuration for gcc 4.3.3 is messed up more or less, and
> have a conflict with unistd.h of Lftp.

I have only probs with the Sbrk for the rest it's working ok, afaik
:P

But the make stops now @
ash.exe ../libtool --silent --tag=CXX --mode=compile g++
-DHAVE_CONFIG_H -I. -I../lib -I../lib -I../trio -I/extras/include
-I/extras/include -I/extras/include -D__EMX__ -DEMX -DOS2
-D__ST_MT_ERRNO__ -O3 -march=pentium -mtune=pentium4 -Wall
-Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti
-fno-implement-inlines -Winline -MT ResMgr.lo -MD -MP -MF
deps/ResMgr.Tpo -c -o ResMgr.lo ResMgr.cc
ResMgr.cc: In static member function 'static const char*
ResMgr::FileReadable(xstring_c*)':
ResMgr.cc:880: error: 'R_OK' was not declared in this scope
ResMgr.cc: In static member function 'static const char*
ResMgr::FileExecutable(xstring_c*)':
ResMgr.cc:884: error: 'X_OK' was not declared in this scope
ResMgr.cc: In static member function 'static const char*
ResMgr::DirReadable(xstring_c*)':
ResMgr.cc:888: error: 'R_OK' was not declared in this scope
ResMgr.cc:888: error: 'X_OK' was not declared in this scope
make.exe[1]: *** [ResMgr.lo] Error 1
make.exe[1]: Leaving directory `U:/lftp-3.7.8/src'
make.exe: *** [all-recursive] Error 1

Dave Yeo

unread,
Feb 3, 2009, 11:27:29 AM2/3/09
to

Try ifdefing the include unistd.h out in lib/unistd.h.
I vaguely remember reading that unistd.h can cause problems and if
possible to not include it though I may be misremembering.
Dave

KO Myung-Hun

unread,
Feb 3, 2009, 10:50:21 PM2/3/09
to
Hi/2.

Tellerbop wrote:
> Hello KO,
>
> On Tue, 3 Feb 2009 14:11:50 UTC, KO Myung-Hun <ko...@chollian.net>
> wrote:
>
>
>> Hi/2.
>>
>> Tellerbop wrote:
>>
>>> Hoi,
>>> Try to port Lftp but it fails with the make:
>>> Use Gcc 4.33
>>>
>>> In file included from ../lib/unistd.h:27,
>>> from ../lib/unistd.h:27,
>>> from log.h:26,
>>> from FileAccess.cc:36:
>>> U:/USR/include/unistd.h:476: error: declaration of C function 'void*
>>> sbrk(gl_intptr_t)' conflicts with
>>> U:/USR/include/stdlib.h:387: error: previous declaration 'void*
>>> sbrk(intptr_t)' here
>>> U:/USR/include/unistd.h:650: error: declaration of C function 'void*
>>> _sbrk(gl_intptr_t)' conflicts with
>>> U:/USR/include/stdlib.h:416: error: previous declaration 'void*
>>> _sbrk(intptr_t)' here
>>>
>>> Any idea
>>>
>>>
> This is the unistd.h i have ł 23.913ł21-07-07
>

Mine is

7-06-10 16:44 23,911 0 unistd.h

>
>> My 'unistd.h' does not have sbrk() and _sbrk() with 'gl_intptr_t' as a
>> argument type.
>>
>
> I commit out the both _sbrk lines and now it goes behind those errors.
>
>

Where ? gcc stuffs ? or Lftp package ? If possible, you'd better not
change gcc stuffs.

> But the make stops now @
> ash.exe ../libtool --silent --tag=CXX --mode=compile g++
> -DHAVE_CONFIG_H -I. -I../lib -I../lib -I../trio -I/extras/include
> -I/extras/include -I/extras/include -D__EMX__ -DEMX -DOS2
> -D__ST_MT_ERRNO__ -O3 -march=pentium -mtune=pentium4 -Wall
> -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti
> -fno-implement-inlines -Winline -MT ResMgr.lo -MD -MP -MF
> deps/ResMgr.Tpo -c -o ResMgr.lo ResMgr.cc
> ResMgr.cc: In static member function 'static const char*
> ResMgr::FileReadable(xstring_c*)':
> ResMgr.cc:880: error: 'R_OK' was not declared in this scope
> ResMgr.cc: In static member function 'static const char*
> ResMgr::FileExecutable(xstring_c*)':
> ResMgr.cc:884: error: 'X_OK' was not declared in this scope
> ResMgr.cc: In static member function 'static const char*
> ResMgr::DirReadable(xstring_c*)':
> ResMgr.cc:888: error: 'R_OK' was not declared in this scope
> ResMgr.cc:888: error: 'X_OK' was not declared in this scope
> make.exe[1]: *** [ResMgr.lo] Error 1
> make.exe[1]: Leaving directory `U:/lftp-3.7.8/src'
> make.exe: *** [all-recursive] Error 1
>
>

X_OK, R_OK are defined in 'sys/unistd.h' and 'sys/fcntl.h', and they are
included by 'unistd.h' and 'fcntl.h', respectively. So you should check
if that file includes 'unistd.h' or 'fcntl.h'.

0 new messages