[erlang-patches] sendfile()

Björn Gustavsson <>
Fri Sep 17 10:34:46 CEST 2010


2010/9/15 Björn Gustavsson <>:
> On Sun, Sep 12, 2010 at 2:00 AM, Tuncer Ayaz <> wrote:
>>
>> git fetch git://github.com/tuncer/otp.git sendfile
>
> Thanks! Included in 'pu'.

We have not had time to review the patch, but here
is some feedback about build problems on three platforms.
Until the build problems are fixed, I will take the branch out of
'pu'.

Windows:

cc.sh -O2 -I/ldisk/daily_build/otp_norel_pu_win32_r14b01.2010-09-16_23/otp_src_R14B01/erts/win32
-DOTP_RELEASE  -D_WIN32_WINNT=0x0500 -DWINVER=0x0500
-D_USE_32BIT_TIME_T -DERTS_MIXED_CYGWIN_VC -DSTATIC_ERLANG_DRIVER
-DHAVE_CONFIG_H  -DUSE_THREADS -DWIN32_THREADS  -DLIBSCTP=
-Iwin32/opt/plain -Ibeam -Isys/win32 -Isys/common -Iwin32 -Izlib
-Ipcre -Ihipe -I../include -I../include/win32 -I../include/internal
-I../include/internal/win32 -Idrivers/common -Idrivers/win32 -c
drivers/common/efile_drv.c -o obj/win32/opt/plain/efile_drv.o
drivers/common/efile_drv.c(1699) : error C2065: 'ENOTCONN' :
undeclared identifier
drivers/common/efile_drv.c(1699) : error C2051: case expression not constant
drivers/common/efile_drv.c(1700) : error C2065: 'ENOTSOCK' :
undeclared identifier
drivers/common/efile_drv.c(1700) : error C2051: case expression not constant
drivers/common/efile_drv.c(1701) : error C2065: 'EOPNOTSUPP' :
undeclared identifier
drivers/common/efile_drv.c(1701) : error C2051: case expression not constant
make[3]: *** [obj/win32/opt/plain/efile_drv.o] Error 2
make[3]: Leaving directory
`/ldisk/daily_build/otp_norel_pu_win32_r14b01.2010-09-16_23/otp_src_R14B01/erts/emulator'
make[2]: *** [opt] Error 2
make[2]: Leaving directory
`/ldisk/daily_build/otp_norel_pu_win32_r14b01.2010-09-16_23/otp_src_R14B01/erts/emulator'
make[1]: *** [opt] Error 2
make[1]: Leaving directory
`/ldisk/daily_build/otp_norel_pu_win32_r14b01.2010-09-16_23/otp_src_R14B01/erts'

(Either move the switch into unix_efile.c or enclose each case in an #ifdef.)


Solaris 10/Intel:

gcc -g -O2 -I/ldisk/daily_build/otp_norel_pu_solaris10_r14b01.2010-09-16_23/otp_src_R14B01/erts/i386-pc-solaris2.10
 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -DERTS_SMP
-DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE
-D_REENTRANT -DPOSIX_THREADS -D_POSIX_PTHREAD_SEMANTICS
-Ii386-pc-solaris2.10/opt/smp -Ibeam -Isys/unix -Isys/common
-Ii386-pc-solaris2.10 -Izlib  -Ipcre -Ihipe -I../include
-I../include/i386-pc-solaris2.10 -I../include/internal
-I../include/internal/i386-pc-solaris2.10 -Idrivers/common
-Idrivers/unix -I../etc/unix -c drivers/unix/unix_efile.c -o
obj/i386-pc-solaris2.10/opt/smp/unix_efile.o
drivers/unix/unix_efile.c:1518: error: conflicting types for 'efile_sendfile'
drivers/common/erl_efile.h:158: error: previous declaration of
'efile_sendfile' was here
drivers/unix/unix_efile.c:1518: error: conflicting types for 'efile_sendfile'
drivers/common/erl_efile.h:158: error: previous declaration of
'efile_sendfile' was here
gmake[3]: *** [obj/i386-pc-solaris2.10/opt/smp/unix_efile.o] Error 1
gmake[3]: Leaving directory
`/ldisk/daily_build/otp_norel_pu_solaris10_r14b01.2010-09-16_23/otp_src_R14B01/erts/emulator'
gmake[2]: *** [opt] Error 2
gmake[2]: Leaving directory
`/ldisk/daily_build/otp_norel_pu_solaris10_r14b01.2010-09-16_23/otp_src_R14B01/erts/emulator'
gmake[1]: *** [smp] Error 2
gmake[1]: Leaving directory
`/ldisk/daily_build/otp_norel_pu_solaris10_r14b01.2010-09-16_23/otp_src_R14B01/erts'
gmake: *** [emulator] Error 2


Darwin 8.11.1 (Mac OS X Tiger, I think):

gcc -mdynamic-no-pic -m32 -g -O2
-I/ldisk/daily_build/otp_norel_pu_macosx_r14b01.2010-09-16_23/otp_src_R14B01/erts/i386-apple-darwin8.11.1
 -no-cpp-precomp  -D_XOPEN_SOURCE -DERTS_SMP -DHAVE_CONFIG_H -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement
-DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS
-Ii386-apple-darwin8.11.1/opt/smp -Ibeam -Isys/unix -Isys/common
-Ii386-apple-darwin8.11.1 -Izlib  -Ipcre -Ihipe -I../include
-I../include/i386-apple-darwin8.11.1 -I../include/internal
-I../include/internal/i386-apple-darwin8.11.1 -Idrivers/common
-Idrivers/unix -I../etc/unix -c drivers/unix/unix_efile.c -o
obj/i386-apple-darwin8.11.1/opt/smp/unix_efile.o
drivers/unix/unix_efile.c:1518: error: conflicting types for 'efile_sendfile'
drivers/common/erl_efile.h:158: error: previous declaration of
'efile_sendfile' was here
make[3]: *** [obj/i386-apple-darwin8.11.1/opt/smp/unix_efile.o] Error 1
make[2]: *** [opt] Error 2
make[1]: *** [smp] Error 2
make: *** [emulator] Error 2

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB


More information about the erlang-patches mailing list