couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r945114 - /couchdb/trunk/src/couchdb/priv/icu_driver/couch_icu_driver.c
Date Mon, 17 May 2010 12:33:37 GMT
Author: kocolosk
Date: Mon May 17 12:33:37 2010
New Revision: 945114

URL: http://svn.apache.org/viewvc?rev=945114&view=rev
Log:
oops, don't commit hacked-up icu_driver

Modified:
    couchdb/trunk/src/couchdb/priv/icu_driver/couch_icu_driver.c

Modified: couchdb/trunk/src/couchdb/priv/icu_driver/couch_icu_driver.c
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/priv/icu_driver/couch_icu_driver.c?rev=945114&r1=945113&r2=945114&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/priv/icu_driver/couch_icu_driver.c (original)
+++ couchdb/trunk/src/couchdb/priv/icu_driver/couch_icu_driver.c Mon May 17 12:33:37 2010
@@ -27,11 +27,8 @@ specific language governing permissions 
 #include "unicode/ucasemap.h"
 #ifndef WIN32
 #include <string.h> // for memcpy
-#include <fcntl.h> // for O_DSYNC
 #endif
 
-#define SET_OSYNC_OPCODE 2
-
 typedef struct {
     ErlDrvPort port;
     UCollator* collNoCase;
@@ -93,19 +90,6 @@ static int return_control_result(void* p
     return localLen;
 }
 
-static char set_osync(int fd) {
-    int flags = fcntl(fd, F_GETFL, 0);
-    if (flags != -1) {
-        if (fcntl(fd, F_SETFL, flags | O_DSYNC) != -1) {
-            return 0;
-        } else {
-            return 1;
-        }
-    } else {
-        return 2;
-    }
-}
-
 static int couch_drv_control(ErlDrvData drv_data, unsigned int command, char *pBuf,
              int bufLen, char **rbuf, int rlen)
 {
@@ -157,14 +141,6 @@ static int couch_drv_control(ErlDrvData 
         return return_control_result(&response, sizeof(response), rbuf, rlen);
         }
 
-    case SET_OSYNC_OPCODE: // set O_SYNC flag on file descriptor
-    {
-        int32_t fd;
-        memcpy(&fd, pBuf, sizeof(fd));
-        char response = set_osync(fd);
-        return return_control_result(&response, sizeof(response), rbuf, rlen);
-    }
-
     default:
         return -1;
     }



Mime
View raw message