summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--newlib/libc/locale/duplocale.c4
-rw-r--r--newlib/libc/locale/freelocale.c2
-rw-r--r--newlib/libc/locale/locale.c12
-rw-r--r--newlib/libc/locale/newlocale.c8
4 files changed, 13 insertions, 13 deletions
diff --git a/newlib/libc/locale/duplocale.c b/newlib/libc/locale/duplocale.c
index 7bd89eafc..263a2b511 100644
--- a/newlib/libc/locale/duplocale.c
+++ b/newlib/libc/locale/duplocale.c
@@ -64,7 +64,7 @@ _duplocale_r (struct _reent *p, struct __locale_t *locobj)
if (!__loadlocale (&tmp_locale, i, tmp_locale.categories[i]))
goto error;
}
-#endif
+#endif /* __HAVE_LOCALE_INFO__ */
/* Allocate new locale_t. */
new_locale = (struct __locale_t *) _calloc_r (p, 1, sizeof *new_locale);
if (!new_locale)
@@ -83,7 +83,7 @@ error:
_free_r (p, (void *) tmp_locale.lc_cat[i].ptr);
_free_r (p, tmp_locale.lc_cat[i].buf);
}
-#endif
+#endif /* __HAVE_LOCALE_INFO__ */
return NULL;
}
diff --git a/newlib/libc/locale/freelocale.c b/newlib/libc/locale/freelocale.c
index e18b45333..eba439e7d 100644
--- a/newlib/libc/locale/freelocale.c
+++ b/newlib/libc/locale/freelocale.c
@@ -50,7 +50,7 @@ _freelocale_r (struct _reent *p, struct __locale_t *locobj)
_free_r (p, (void *) locobj->lc_cat[i].ptr);
_free_r (p, locobj->lc_cat[i].buf);
}
-#endif
+#endif /* __HAVE_LOCALE_INFO__ */
_free_r (p, locobj);
}
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 58c28490c..9808022d1 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -234,7 +234,7 @@ const struct __locale_t __C_locale =
"\1",
"ASCII",
"ASCII",
-#else
+#else /* __HAVE_LOCALE_INFO__ */
{
{ NULL, NULL }, /* LC_ALL */
#ifdef __CYGWIN__
@@ -248,7 +248,7 @@ const struct __locale_t __C_locale =
{ &_C_time_locale, NULL }, /* LC_TIME */
{ &_C_messages_locale, NULL }, /* LC_MESSAGES */
},
-#endif
+#endif /* __HAVE_LOCALE_INFO__ */
};
struct __locale_t __global_locale =
@@ -274,7 +274,7 @@ struct __locale_t __global_locale =
"\1",
"ASCII",
"ASCII",
-#else
+#else /* __HAVE_LOCALE_INFO__ */
{
{ NULL, NULL }, /* LC_ALL */
#ifdef __CYGWIN__
@@ -288,7 +288,7 @@ struct __locale_t __global_locale =
{ &_C_time_locale, NULL }, /* LC_TIME */
{ &_C_messages_locale, NULL }, /* LC_MESSAGES */
},
-#endif
+#endif /* __HAVE_LOCALE_INFO__ */
};
/* Renamed from current_locale_string to make clear this is only the
@@ -313,7 +313,7 @@ _DEFUN(_setlocale_r, (p, category, locale),
return NULL;
}
return "C";
-#else /* !_MB_CAPABLE */
+#else /* _MB_CAPABLE */
static char new_categories[_LC_LAST][ENCODING_LEN + 1];
static char saved_categories[_LC_LAST][ENCODING_LEN + 1];
int i, j, len, saverr;
@@ -445,7 +445,7 @@ _DEFUN(_setlocale_r, (p, category, locale),
}
}
return currentlocale ();
-#endif /* !_MB_CAPABLE */
+#endif /* _MB_CAPABLE */
}
#ifdef _MB_CAPABLE
diff --git a/newlib/libc/locale/newlocale.c b/newlib/libc/locale/newlocale.c
index 239173bca..b4a477801 100644
--- a/newlib/libc/locale/newlocale.c
+++ b/newlib/libc/locale/newlocale.c
@@ -149,12 +149,12 @@ _newlocale_r (struct _reent *p, int category_mask, const char *locale,
subsequent error. */
tmp_locale.lc_cat[i].ptr = base->lc_cat[i].ptr;
tmp_locale.lc_cat[i].buf = (void *) -1;
-#else
+#else /* !__HAVE_LOCALE_INFO__ */
if (i == LC_CTYPE)
strcpy (tmp_locale.ctype_codeset, base->ctype_codeset);
else if (i == LC_MESSAGES)
strcpy (tmp_locale.message_codeset, base->message_codeset);
-#endif
+#endif /* !__HAVE_LOCALE_INFO__ */
}
/* Otherwise, if the category is in category_mask, create entry. */
else if (((1 << i) & category_mask) != 0)
@@ -184,7 +184,7 @@ _newlocale_r (struct _reent *p, int category_mask, const char *locale,
tmp_locale.lc_cat[i].buf = base->lc_cat[i].buf;
base->lc_cat[i].ptr = base->lc_cat[i].buf = NULL;
}
-#endif
+#endif /* __HAVE_LOCALE_INFO__ */
_freelocale_r (p, base);
}
@@ -203,7 +203,7 @@ error:
_free_r (p, (void *) tmp_locale.lc_cat[i].ptr);
_free_r (p, tmp_locale.lc_cat[i].buf);
}
-#endif
+#endif /* __HAVE_LOCALE_INFO__ */
return NULL;
}