/[pcre]/code/trunk/pcreposix.h
ViewVC logotype

Diff of /code/trunk/pcreposix.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 117 by ph10, Fri Mar 9 15:59:06 2007 UTC revision 200 by ph10, Wed Aug 1 09:10:40 2007 UTC
# Line 105  typedef struct { Line 105  typedef struct {
105    regoff_t rm_eo;    regoff_t rm_eo;
106  } regmatch_t;  } regmatch_t;
107    
108  /* Win32 uses DLL by default; it needs special stuff for exported functions  /* When an application links to a PCRE DLL in Windows, the symbols that are
109  when building PCRE. */  imported have to be identified as such. When building PCRE, the appropriate
110    export settings are needed, and are set in pcreposix.c before including this
111  #ifndef PCRE_DATA_SCOPE  file. */
112  #ifdef _WIN32  
113  #  ifdef PCRE_DEFINITION  #if defined(_WIN32) && !defined(PCRE_STATIC) && !defined(PCREPOSIX_EXP_DECL)
114  #    ifdef DLL_EXPORT  #  define PCREPOSIX_EXP_DECL  extern __declspec(dllimport)
115  #      define PCRE_DATA_SCOPE __declspec(dllexport)  #  define PCREPOSIX_EXP_DEFN  __declspec(dllimport)
 #    endif  
 #  else  
 #    ifndef PCRE_STATIC  
 #      define PCRE_DATA_SCOPE extern __declspec(dllimport)  
 #    endif  
 #  endif  
 #endif  
116  #endif  #endif
117    
118  /* Otherwise, we use the standard "extern". */  /* By default, we use the standard "extern" declarations. */
119    
120  #ifndef PCRE_DATA_SCOPE  #ifndef PCREPOSIX_EXP_DECL
121  #  ifdef __cplusplus  #  ifdef __cplusplus
122  #    define PCRE_DATA_SCOPE     extern "C"  #    define PCREPOSIX_EXP_DECL  extern "C"
123    #    define PCREPOSIX_EXP_DEFN  extern "C"
124  #  else  #  else
125  #    define PCRE_DATA_SCOPE     extern  #    define PCREPOSIX_EXP_DECL  extern
126    #    define PCREPOSIX_EXP_DEFN  extern
127  #  endif  #  endif
128  #endif  #endif
129    
130  /* The functions */  /* The functions */
131    
132  PCRE_DATA_SCOPE int regcomp(regex_t *, const char *, int);  PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
133  PCRE_DATA_SCOPE int regexec(const regex_t *, const char *, size_t,  PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
134                    regmatch_t *, int);                       regmatch_t *, int);
135  PCRE_DATA_SCOPE size_t regerror(int, const regex_t *, char *, size_t);  PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
136  PCRE_DATA_SCOPE void regfree(regex_t *);  PCREPOSIX_EXP_DECL void regfree(regex_t *);
137    
138  #ifdef __cplusplus  #ifdef __cplusplus
139  }   /* extern "C" */  }   /* extern "C" */

Legend:
Removed from v.117  
changed lines
  Added in v.200

  ViewVC Help
Powered by ViewVC 1.1.5