~n-muench/ubuntu/precise/open-vm-tools/open-vm-tools.march-merge

« back to all changes in this revision

Viewing changes to lib/file/fileIOPosix.c

  • Committer: Nate Muench
  • Date: 2012-03-22 17:50:13 UTC
  • mfrom: (1.4.7)
  • Revision ID: nowiwilldestroyabydos@gmail.com-20120322175013-0jh30wfk7ut20rdj
Tags: 2012.03.13-651368-0ubuntu1
* Merge latest upstream git tag.
* debian/rules: Removed glib2.0 compatibility CFLAG.
  - Packaging can now build without it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 * These headers are needed to get __USE_LARGEFILE, __USE_LARGEFILE64,
45
45
 * and SYS__llseek.
46
46
 */
 
47
#   ifdef ANDROID_X86
 
48
#      undef _GNU_SOURCE
 
49
#   endif
47
50
#   include <features.h>
 
51
#   ifndef _GNU_SOURCE
 
52
#      define _GNU_SOURCE
 
53
#   endif
48
54
#   include <linux/unistd.h>
 
55
#ifdef ANDROID_X86
 
56
#   include <sys/syscall.h>
 
57
#else
49
58
#   include <syscall.h>
50
59
#endif
 
60
#endif
 
61
#if defined __ANDROID__
 
62
#   include <sys/syscall.h>
 
63
#endif
51
64
#include <sys/stat.h>
52
65
#include "su.h"
53
66
 
1856
1869
            goto exit;
1857
1870
         }
1858
1871
         if (retval < leftToWrite) {
1859
 
            LOG_ONCE((LGPFX" %s wrote %"FMTSZ"d out of %"FMTSZ"u bytes.\n",
1860
 
                      __FUNCTION__, retval, leftToWrite));
 
1872
            /*
 
1873
             * Using %zd on Android generated a warning about
 
1874
             * expecting a "signed size_t" argument; casting retval to
 
1875
             * "signed size_t" generated an error, though. We've
 
1876
             * already checked for retval == -1 above, so the cast
 
1877
             * below should be OK. Refer to bug 817761.
 
1878
             */
 
1879
            LOG_ONCE((LGPFX" %s wrote %"FMTSZ"u out of %"FMTSZ"u bytes.\n",
 
1880
                      __FUNCTION__, (size_t)retval, leftToWrite));
1861
1881
         }
1862
1882
 
1863
1883
         buf += retval;