summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/couchdb/priv/icu_driver/couch_icu_driver.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/couchdb/priv/icu_driver/couch_icu_driver.c b/src/couchdb/priv/icu_driver/couch_icu_driver.c
index 0bb843b5..1afe8eac 100644
--- a/src/couchdb/priv/icu_driver/couch_icu_driver.c
+++ b/src/couchdb/priv/icu_driver/couch_icu_driver.c
@@ -27,11 +27,8 @@ specific language governing permissions and limitations under the License.
#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* pLocalResult, int localLen, char **ppRetB
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 drv_data, unsigned int command, char *pB
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;
}