cmake HAVE_SYNC_FETCH_AND_ADD examples

MapServer/MapServer CMakeLists.txt :139

check_c_source_compiles("
int main(int argc, char **argv) {
   long x=0,y=0;
   for(x=0;x<5;x++) {
     if(y>1) break;
     y=__sync_fetch_and_add(&x,1);
   }
}" HAVE_SYNC_FETCH_AND_ADD)