Commit Graph

7 Commits

Author SHA1 Message Date
tball@google.com 898ec7731f Added Socket::Close() function.
Review URL: https://codereview.chromium.org//12209047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18199 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 00:44:55 +00:00
gram@google.com 3601944836 Revised CL for customisable logging (replacing printfs).
Review URL: https://codereview.chromium.org//11312242

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15096 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 17:38:15 +00:00
kustermann@google.com 6d1cda397c Added FD_CLOEXEC flag to client/server socket file descriptors
Without the FD_CLOEXEC, all subprocesses will inherit the open socket
file descriptors of the current process due to the default behavior
of fork()+exec().

Review URL: https://codereview.chromium.org//11416006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14952 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 11:27:33 +00:00
jackpal@google.com 5ef2b814bd Don't use TEMP_FAILURE_RETRY macro with inet_addr
inet_addr is not a syscall, therefore it should not be used with the
TEMP_FAILURE_RETRY macro.

This fixes a warning in the Android build.

Review URL: https://codereview.chromium.org//10907248

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12447 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-17 18:48:33 +00:00
jackpal@google.com e71572cebc Use casts to work around bug in Android TEMP_FAILURE_RETRY macro
See http://code.google.com/p/android/issues/detail?id=37426
"unistd.h TEMP_FAILURE_RETRY generates warning when used with syscall
 that returns unsigned int".

The Android version of this macro will generate a signed/unsigned
comparison when used with a syscall function that returns an unsigned
value such as inet_addr(), which returns in_addr_t, which is defined as
an unsigned int. By casting the result to an int before the macro
processes it, and then casting it back to an in_addr_t after the macro
returns it we are able to avoid the signed/unsigned comparison, and so
avoid the signed/unsigned comparison warning.

Review URL: https://codereview.chromium.org//10907228

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12395 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-14 18:20:24 +00:00
ajohnsen@google.com 0c17bf126c Throw an error if the ServerSocket host argument is invalid.
BUG=

Review URL: https://chromiumcodereview.appspot.com//10917064

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11769 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 14:39:47 +00:00
jackpal@google.com e060b66a3e Add _android files for building DartVM on Android
Split directory_posix -> directory_(android|linux|macos)
  This allows us to cleanly make Android-specific changes to
  directory_android.cc

Copy all _linux files to _android files and edit as needed to account
for the differences between Linux and Android:

 + getcwd(0, NULL) doesn't work on Android, have to emulate
 + Android doesn't have a '/tmp' directory, have to emulate
 + Android doesn't provide mkdtemp(), have to emulate.
 + Small differences in the available system include files.
 + Use pthread_cond_timedwait_monotonic instead of
   pthread_condattr_setclock

Review URL: https://chromiumcodereview.appspot.com//10826233

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10613 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 23:06:52 +00:00