Windows replacement for strtok_r()
authorPeter Eisentraut <[email protected]>
Tue, 23 Jul 2024 07:13:48 +0000 (09:13 +0200)
committerPeter Eisentraut <[email protected]>
Tue, 23 Jul 2024 07:20:22 +0000 (09:20 +0200)
They spell it "strtok_s" there.

There are currently no uses, but some will be added soon.

Reviewed-by: Kyotaro Horiguchi <[email protected]>
Reviewed-by: David Steele <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/79692bf9-17d3-41e6-b9c9-fc8c3944222a@eisentraut.org

src/include/port/win32_port.h

index 3d1de166cb06f630b7cda07d85805e8c62ac3c22..7ffe5891c69ac9b76b0f697ad75796b777140958 100644 (file)
@@ -415,6 +415,11 @@ extern int _pglstat64(const char *name, struct stat *buf);
 #undef ETIMEDOUT
 #define ETIMEDOUT WSAETIMEDOUT
 
+/*
+ * Supplement to <string.h>.
+ */
+#define strtok_r strtok_s
+
 /*
  * Locale stuff.
  *