X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=regex.c;h=cf89000df11b582668209fc3234c62ad17928ad8;hb=refs%2Ftags%2FFILEUTILS-3_16x;hp=2a260376833ccfc52857b9ba3ebc13f80a68c4bd;hpb=f78b8d0da33d185dfad6709e0eade5912de28024;p=gnulib.git diff --git a/regex.c b/regex.c index 2a2603768..cf89000df 100644 --- a/regex.c +++ b/regex.c @@ -27,11 +27,15 @@ #undef _GNU_SOURCE #define _GNU_SOURCE +#ifdef emacs /* Converts the pointer to the char to BEG-based offset from the start. */ #define PTR_TO_OFFSET(d) \ POS_AS_IN_BUFFER (MATCHING_IN_FIRST_STRING \ ? (d) - string1 : (d) - (string2 - size1)) #define POS_AS_IN_BUFFER(p) ((p) + (NILP (re_match_object) || BUFFERP (re_match_object))) +#else +#define PTR_TO_OFFSET(d) 0 +#endif #ifdef HAVE_CONFIG_H #include @@ -1874,7 +1878,12 @@ regex_compile (pattern, size, syntax, bufp) compile_stack_type compile_stack; /* Points to the current (ending) position in the pattern. */ +#ifdef AIX + /* `const' makes AIX compiler fail. */ + char *p = pattern; +#else const char *p = pattern; +#endif const char *pend = pattern + size; /* How to translate the characters in the pattern. */