-# define GL_CONCAT(x, y) GL_CONCAT0 (x, y)
-# define GL_CONCAT0(x, y) x##y
-
-/* __COUNTER__ evaluates to 0, 1, 2,..., adding one one each time the
- preprocessor uses it. If the preprocessor doesn't support this
- builtin macro, define it to 0. */
-# ifndef __COUNTER__
-# define __COUNTER__ 0
+# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
+# define _GL_CONCAT0(x, y) x##y
+
+/* _GL_COUNTER is an integer, preferably one that changes each time we
+ use it. Use __COUNTER__ if it works, falling back on __LINE__
+ otherwise. __LINE__ isn't perfect, but it's better than a
+ constant. */
+# if defined __COUNTER__ && __COUNTER__ != __COUNTER__
+# define _GL_COUNTER __COUNTER__
+# else
+# define _GL_COUNTER __LINE__