[Groonga-commit] pgroonga/pgroonga at 9591a7a [master] Extract definitions for portability

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Fri Dec 30 00:17:19 JST 2016


Kouhei Sutou	2016-12-30 00:17:19 +0900 (Fri, 30 Dec 2016)

  New Revision: 9591a7aa285b8eae5e3c977e35787a2bdd1dc402
  https://github.com/pgroonga/pgroonga/commit/9591a7aa285b8eae5e3c977e35787a2bdd1dc402

  Message:
    Extract definitions for portability

  Added files:
    src/pgrn_portable.h
  Modified files:
    src/pgroonga.c

  Added: src/pgrn_portable.h (+9 -0) 100644
===================================================================
--- /dev/null
+++ src/pgrn_portable.h    2016-12-30 00:17:19 +0900 (6713e63)
@@ -0,0 +1,9 @@
+#pragma once
+
+#ifdef WIN32
+typedef struct _stat pgrn_stat_buffer;
+#	define pgrn_stat(path, buffer) _stat(path, buffer)
+#else
+typedef struct stat pgrn_stat_buffer;
+#	define pgrn_stat(path, buffer) stat(path, buffer)
+#endif

  Modified: src/pgroonga.c (+1 -9)
===================================================================
--- src/pgroonga.c    2016-12-29 23:40:07 +0900 (e9211f6)
+++ src/pgroonga.c    2016-12-30 00:17:19 +0900 (e3db911)
@@ -17,6 +17,7 @@
 #include "pgrn_match_positions_character.h"
 #include "pgrn_options.h"
 #include "pgrn_pg.h"
+#include "pgrn_portable.h"
 #include "pgrn_query_extract_keywords.h"
 #include "pgrn_search.h"
 #include "pgrn_value.h"
@@ -66,15 +67,6 @@
 #	include <unistd.h>
 #endif
 
-#ifdef WIN32
-typedef struct _stat pgrn_stat_buffer;
-#	define pgrn_stat(path, buffer) _stat(path, buffer)
-#else
-typedef struct stat pgrn_stat_buffer;
-#	define pgrn_stat(path, buffer) stat(path, buffer)
-#endif
-
-
 PG_MODULE_MAGIC;
 
 static bool PGrnInitialized = false;
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index