media/omx-plugin/include/froyo/cutils/uio.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/omx-plugin/include/froyo/cutils/uio.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +/*
     1.5 + * Copyright (C) 2007 The Android Open Source Project
     1.6 + *
     1.7 + * Licensed under the Apache License, Version 2.0 (the "License");
     1.8 + * you may not use this file except in compliance with the License.
     1.9 + * You may obtain a copy of the License at
    1.10 + *
    1.11 + *      http://www.apache.org/licenses/LICENSE-2.0
    1.12 + *
    1.13 + * Unless required by applicable law or agreed to in writing, software
    1.14 + * distributed under the License is distributed on an "AS IS" BASIS,
    1.15 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    1.16 + * See the License for the specific language governing permissions and
    1.17 + * limitations under the License.
    1.18 + */
    1.19 +
    1.20 +//
    1.21 +// implementation of sys/uio.h for platforms that don't have it (Win32)
    1.22 +//
    1.23 +#ifndef _LIBS_CUTILS_UIO_H
    1.24 +#define _LIBS_CUTILS_UIO_H
    1.25 +
    1.26 +#ifdef HAVE_SYS_UIO_H
    1.27 +#include <sys/uio.h>
    1.28 +#else
    1.29 +
    1.30 +#ifdef __cplusplus
    1.31 +extern "C" {
    1.32 +#endif
    1.33 +
    1.34 +#include <stddef.h>
    1.35 +
    1.36 +struct iovec {
    1.37 +    const void*  iov_base;
    1.38 +    size_t       iov_len;
    1.39 +};
    1.40 +
    1.41 +extern int  readv( int  fd, struct iovec*  vecs, int  count );
    1.42 +extern int  writev( int  fd, const struct iovec*  vecs, int  count );
    1.43 +
    1.44 +#ifdef __cplusplus
    1.45 +}
    1.46 +#endif
    1.47 +
    1.48 +#endif /* !HAVE_SYS_UIO_H */
    1.49 +
    1.50 +#endif /* _LIBS_UTILS_UIO_H */
    1.51 +

mercurial