Changeset 843 for trunk/zoo-project


Ignore:
Timestamp:
Aug 7, 2017, 8:53:53 PM (2 years ago)
Author:
jmckenna
Message:

handle duplicate strcasestr declarations on Windows

Location:
trunk/zoo-project/zoo-kernel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/service.c

    r805 r843  
    15941594  m=&trorf;
    15951595}
     1596
     1597#ifdef WIN32
     1598char *strcasestr (char const *a, char const *b)
     1599#ifndef USE_MS
     1600  {
     1601    char *x = zStrdup (a);
     1602    char *y = zStrdup (b);
     1603 
     1604      x = _strlwr (x);
     1605      y = _strlwr (y);
     1606    char *pos = strstr (x, y);
     1607    char *ret = pos == NULL ? NULL : (char *) (a + (pos - x));
     1608      free (x);
     1609      free (y);
     1610      return ret;
     1611  };
     1612#else
     1613   ;
     1614#endif
     1615#endif
  • trunk/zoo-project/zoo-kernel/service.h

    r842 r843  
    3232#else
    3333#define ZOO_DLL_EXPORT
     34#endif
     35
     36#ifdef WIN32
     37ZOO_DLL_EXPORT char *strcasestr (char const *,char const *);
    3438#endif
    3539
  • trunk/zoo-project/zoo-kernel/zoo_loader.c

    r835 r843  
    6363#ifndef FALSE
    6464#define FALSE -1
    65 #endif
    66 
    67 #ifdef WIN32
    68 extern "C"
    69 {
    70   __declspec (dllexport) char *strcasestr (char const *a, char const *b)
    71 #ifndef USE_MS
    72   {
    73     char *x = zStrdup (a);
    74     char *y = zStrdup (b);
    75 
    76       x = _strlwr (x);
    77       y = _strlwr (y);
    78     char *pos = strstr (x, y);
    79     char *ret = pos == NULL ? NULL : (char *) (a + (pos - x));
    80       free (x);
    81       free (y);
    82       return ret;
    83   };
    84 #else
    85    ;
    86 #endif
    87 }
    8865#endif
    8966
  • trunk/zoo-project/zoo-kernel/zoo_service_loader.c

    r817 r843  
    4040#include "ulinet.h"
    4141
    42 #include <libintl.h>
     42#include <libinti.h>
    4343#include <locale.h>
    4444#include <string.h>
     
    107107#ifndef WIN32
    108108extern char **environ;
    109 #endif
    110 
    111 
    112 #ifdef WIN32
    113 extern "C"
    114 {
    115   __declspec (dllexport) char *strcasestr (char const *a, char const *b)
    116 #ifndef USE_MS
    117   {
    118     char *x = zStrdup (a);
    119     char *y = zStrdup (b);
    120 
    121       x = _strlwr (x);
    122       y = _strlwr (y);
    123     char *pos = strstr (x, y);
    124     char *ret = pos == NULL ? NULL : (char *) (a + (pos - x));
    125       free (x);
    126       free (y);
    127       return ret;
    128   };
    129 #else
    130    ;
    131 #endif
    132 }
    133109#endif
    134110
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png