Always include G_SOCKET_FAMILY_UNIX value in GSocketFamily

This is needed because glib-mkenums doesn't handle #ifdef values in
enums, and so it needs to have all values always defined in the enum.
When not available, define the missing values to a negative value.
This commit is contained in:
Rodrigo Moya
2012-04-04 11:39:03 +02:00
parent 091d652120
commit 118c42e747
3 changed files with 18 additions and 3 deletions

View File

@@ -3344,7 +3344,17 @@ g_pollhup=$glib_cv_value_POLLHUP
g_pollerr=$glib_cv_value_POLLERR
g_pollnval=$glib_cv_value_POLLNVAL
g_af_unix=$glib_cv_value_AF_UNIX
# If a family is not found on the system, define that family to
# a negative value, picking a different one for each undefined
# family (-1 for AF_UNIX, -2 for the next one, -3 ...)
# This is needed because glib-mkenums doesn't handle optional
# values in enums, and thus we have to have all existing values
# defined in the enum.
if "x$glib_cv_value_AF_UNIX" != "x"; then
g_af_unix=$glib_cv_value_AF_UNIX
else
g_af_unix=-1
fi
g_af_inet=$glib_cv_value_AF_INET
g_af_inet6=$glib_cv_value_AF_INET6