1*7304104dSAndroid Build Coastguard Worker /* 2*7304104dSAndroid Build Coastguard Worker * Copyright 2013, The Android Open Source Project 3*7304104dSAndroid Build Coastguard Worker * 4*7304104dSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*7304104dSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*7304104dSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*7304104dSAndroid Build Coastguard Worker * 8*7304104dSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*7304104dSAndroid Build Coastguard Worker * 10*7304104dSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*7304104dSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*7304104dSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*7304104dSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*7304104dSAndroid Build Coastguard Worker * limitations under the License. 15*7304104dSAndroid Build Coastguard Worker */ 16*7304104dSAndroid Build Coastguard Worker 17*7304104dSAndroid Build Coastguard Worker #ifndef ANDROID_FIXUP_H 18*7304104dSAndroid Build Coastguard Worker #define ANDROID_FIXUP_H 19*7304104dSAndroid Build Coastguard Worker rawmemchr(const void * s,int c)20*7304104dSAndroid Build Coastguard Workerstatic inline void *rawmemchr(const void *s, int c) 21*7304104dSAndroid Build Coastguard Worker { 22*7304104dSAndroid Build Coastguard Worker const unsigned char *ptr = s; 23*7304104dSAndroid Build Coastguard Worker while (1) { 24*7304104dSAndroid Build Coastguard Worker if (*ptr == c) return (void *) ptr; 25*7304104dSAndroid Build Coastguard Worker ptr++; 26*7304104dSAndroid Build Coastguard Worker } 27*7304104dSAndroid Build Coastguard Worker } 28*7304104dSAndroid Build Coastguard Worker 29*7304104dSAndroid Build Coastguard Worker /* workaround for canonicalize_file_name */ 30*7304104dSAndroid Build Coastguard Worker #define canonicalize_file_name(path) realpath(path, NULL) 31*7304104dSAndroid Build Coastguard Worker 32*7304104dSAndroid Build Coastguard Worker #endif /* ANDROID_FIXUP_H */ 33