fix EINTR handling in sendfile driver
fix EINTR handling in sendfile driver

Tuncer Ayaz pointed out that OS X sendfile will return bytes sent for
the case when EINTR occurs. Make sendfile driver handle this case by
treating EINTR the same as EAGAIN for all supported platforms.

Also update driver to use ERL_DRV_* flags in driver_select calls if
they're defined, rather than the old DO_* flags. This is considered
correct practice since R13B.

bsmr-erlang/yaws,leoliu/yaws,ca91/yaws,watonyweng/yaws,imtal/yaws,ca91/yaws,phonohawk/yaws,watonyweng/yaws,klacke/yaws,phonohawk/yaws,zephyrean/yaws,weisslj/yaws,patternmatched/yaws,klacke/yaws,treacheroustalks/yaws,weisslj/yaws,patternmatched/yaws,zephyrean/yaws,imtal/yaws,weisslj/yaws,klacke/yaws,bsmr-erlang/yaws,leoliu/yaws,ca91/yaws,sebgod/yaws,imtal/yaws,andreineculau/yaws,watonyweng/yaws,weisslj/yaws,imtal/yaws,zephyrean/yaws,imtal/yaws,leoliu/yaws,phonohawk/yaws,imtal/yaws,andreineculau/yaws,zephyrean/yaws,namjae/yaws,sebgod/yaws,jgrinstead/yaws,patternmatched/yaws,treacheroustalks/yaws,phonohawk/yaws,phonohawk/yaws,capflam/yaws,sebgod/yaws,ca91/yaws,ca91/yaws,weisslj/yaws,bsmr-erlang/yaws,leoliu/yaws,namjae/yaws,klacke/yaws,namjae/yaws,toraritte/azith,zephyrean/yaws,watonyweng/yaws,treacheroustalks/yaws,sebgod/yaws,klacke/yaws,sebgod/yaws,leoliu/yaws,phonohawk/yaws,toraritte/azith,andreineculau/yaws,jgrinstead/yaws,capflam/yaws,toraritte/azith,weisslj/yaws,capflam/yaws,jgrinstead/yaws,bsmr-erlang/yaws,jgrinstead/yaws,capflam/yaws,sebgod/yaws,bsmr-erlang/yaws,leoliu/yaws,sebgod/yaws,namjae/yaws,andreineculau/yaws,jgrinstead/yaws,leoliu/yaws,watonyweng/yaws,phonohawk/yaws,patternmatched/yaws,ca91/yaws,patternmatched/yaws,watonyweng/yaws,patternmatched/yaws,toraritte/azith,jgrinstead/yaws,patternmatched/yaws,imtal/yaws,toraritte/azith,bsmr-erlang/yaws,toraritte/azith,watonyweng/yaws,weisslj/yaws,bsmr-erlang/yaws,namjae/yaws,klacke/yaws,klacke/yaws,capflam/yaws,capflam/yaws,namjae/yaws,andreineculau/yaws,jgrinstead/yaws,toraritte/azith,ca91/yaws,zephyrean/yaws,zephyrean/yaws,capflam/yaws,namjae/yaws,treacheroustalks/yaws