--- a/gau2grid/c_pragma.py
+++ b/gau2grid/c_pragma.py
@@ -40,6 +40,16 @@
     #define PRAGMA_VECTORIZE                                 __pragma(loop(ivdep))
     #define PRAGMA_RESTRICT                                  __restrict
 
+#elif defined(__clang__) && defined(__MINGW32__)
+    // pragmas for Clang on MinGW-w64
+
+    #define ALIGNED_MALLOC(alignment, size)                  _aligned_malloc(size, alignment)
+    #define ALIGNED_FREE(ptr)                                _aligned_free(ptr)
+    #define ASSUME_ALIGNED(ptr, width)
+
+    #define PRAGMA_VECTORIZE                                 _Pragma("clang loop vectorize(enable)")
+    #define PRAGMA_RESTRICT                                  __restrict
+
 #elif defined(__clang__)
     // pragmas for Clang.
     // Do this before GCC because clang also defines __GNUC__
@@ -59,6 +69,16 @@
     #define ASSUME_ALIGNED(ptr, width)
 
     #define PRAGMA_VECTORIZE                                 _Pragma("GCC ivdep")
+    #define PRAGMA_RESTRICT                                  __restrict__
+
+#elif (defined(__GNUC__) || defined(__GNUG__)) && defined(__MINGW32__)
+    // pragmas for GCC on MinGW-w64
+
+    #define ALIGNED_MALLOC(alignment, size)                  _aligned_malloc(size, alignment)
+    #define ALIGNED_FREE(ptr)                                _aligned_free(ptr)
+    #define ASSUME_ALIGNED(ptr, width)
+
+    #define PRAGMA_VECTORIZE                                 _Pragma("GCC ivdep")
     #define PRAGMA_RESTRICT                                  __restrict__
 
 #elif defined(__GNUC__) || defined(__GNUG__)
