打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Cross Reference: /android/4.1.1/external/elfutils/host
1/*2 * Copyright 2012, The Android Open Source Project3 *4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 *8 *      http://www.apache.org/licenses/LICENSE-2.09 *10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */1617#ifndef ANDROID_FIXUP_H18#define ANDROID_FIXUP_H1920#define loff_t off_t21#define off64_t off_t2223#include <string.h>24#include <stdarg.h>25#include <stdlib.h>26#include <stdio.h>27#include <errno.h>28#include <locale.h> //LC_MESSAGES2930#ifndef TEMP_FAILURE_RETRY31#define TEMP_FAILURE_RETRY(exp) ({         32    typeof (exp) _rc;                      33    do {                                   34        _rc = (exp);                       35    } while (_rc == -1 && errno == EINTR); 36    _rc; })37#endif3839#if __MAC_OS_X_VERSION_MIN_REQUIRED < 107040static inline size_t strnlen (const char *__string, size_t __maxlen)41{42        int len = 0;43        while (__maxlen-- && *__string++)44                len++;45        return len;46}47#endif4849static inline void *mempcpy (void * __dest, const void * __src, size_t __n)50{51        memcpy(__dest, __src, __n);52        return ((char *)__dest) + __n;53}5455#define __mempcpy mempcpy5657#define dgettext(domainname, msgid)  dcgettext (domainname, msgid, LC_MESSAGES)5859static inline void __attribute__((noreturn)) error(int status, int errnum, const char *fmt, ...)60{61        va_list lst;62        va_start(lst, fmt);63        vfprintf(stderr, fmt, lst);64        fprintf(stderr, "error %d: %s\n", errnum, strerror(errno));65        va_end(lst);66        exit(status);67}6869static inline char *dcgettext (char *__domainname, char *__msgid, int __category)70{71        error(EXIT_FAILURE, 0, "%s not implemented!", __FUNCTION__);72        return NULL;73}7475/* workaround for canonicalize_file_name */76#define canonicalize_file_name(path) realpath(path, NULL)7778/* workaround for open64 */79#define open64(path, flags)     open(path, flags)8081/* rawmemchr */82static inline void *rawmemchr(const void *s, int c)83{84    const unsigned char *ptr = s;85    while (1) {86        if (*ptr == c) return (void *) ptr;87        ptr++;88    }89}9091#define strndup(str, size) strdup(str)9293static void tdestroy(void *root, void (*free_node)(void *nodep))94{95}9697#endif /* ANDROID_FIXUP_H */98
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
ubuntu 编译 Android 出现的若干错误及解决方法(转)
fedoare16 android
LLVM Language Reference Manual
巴塞罗那潮流火腿店 HAM ON WHEELS / External Reference Architects
open failed: EACCES (Permission denied)
const头文件定义问题的讨论
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服