/* posix_enum_to_string.c generated by valac, the Vala compiler
 * generated from posix_enum_to_string.vala, do not modify */

#include <assert.h>
#include <stdlib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

typedef enum  {
	FOO_BAR,
	FOO_BAZ
} Foo;

static void _vala_main (void);
static const char* _foo_to_string (Foo value);

static const char*
_foo_to_string (Foo value)
{
	switch (value) {
		case FOO_BAR:
		return "FOO_BAR";
		case FOO_BAZ:
		return "FOO_BAZ";
	}
	return NULL;
}

static int
_strcmp0 (const void * s1,
          const void * s2)
{
	if (!s1) {
		return -(s1 != s2);
	}
	if (!s2) {
		return s1 != s2;
	}
	return strcmp (s1, s2);
}

static void
_vala_main (void)
{
	const char* _tmp0_;
	_tmp0_ = _foo_to_string (FOO_BAR);
	assert (_strcmp0 (_tmp0_, "FOO_BAR") == 0);
}

int
main (int argc,
      char ** argv)
{
	_vala_main ();
	return 0;
}

