浏览代码

Avoid redefinition of macros (#1263)

Fixes -Wmacro-redefined compiler warning
nilason 4 年之前
父节点
当前提交
8da3d1826f
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      lib/db/dbmi_base/dirent.c

+ 6 - 0
lib/db/dbmi_base/dirent.c

@@ -17,9 +17,15 @@
 #include <unistd.h>
 #include <unistd.h>
 #include <grass/dbmi.h>
 #include <grass/dbmi.h>
 /* NOTE: these should come from <unistd.h> or from <sys/file.h> */
 /* NOTE: these should come from <unistd.h> or from <sys/file.h> */
+#ifndef R_OK
 #define R_OK 4
 #define R_OK 4
+#endif
+#ifndef W_OK
 #define W_OK 2
 #define W_OK 2
+#endif
+#ifndef X_OK
 #define X_OK 1
 #define X_OK 1
+#endif
 
 
 #include <sys/types.h>
 #include <sys/types.h>
 #ifdef USE_DIRECT
 #ifdef USE_DIRECT