mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-15 08:10:17 +02:00
Remove references to undefined macros.
The intent is to allow compilation with `-Wundef', which in turn should make it easier to catch erroneous uses of nonexistent macros. * libguile/__scm.h: Don't assume `BUILDING_LIBGUILE' is defined. * libguile/conv-uinteger.i.c (SCM_TO_TYPE_PROTO): Remove unneeded CPP conditional on `TYPE_MIN == 0'. * libguile/fports.c: Check for the definition of `HAVE_CHSIZE' and `HAVE_FTRUNCATE', not for their value. * libguile/ports.c: Likewise. * libguile/numbers.c (guile_ieee_init): Likewise with `HAVE_DINFINITY' and `HAVE_DQNAN'. * test-suite/standalone/test-conversion.c (ieee_init): Likewise. * libguile/strings.c: Likewise with `SCM_STRING_LENGTH_HISTOGRAM'. * libguile/strings.h: Likewise. * libguile/tags.h: Likewise with `HAVE_INTTYPES_H' and `HAVE_STDINT_H'. * libguile/threads.c: Likewise with `HAVE_PTHREAD_GET_STACKADDR_NP'. * libguile/vm-engine.c (VM_NAME): Likewise with `VM_CHECK_IP'. * libguile/gen-scmconfig.c (main): Use "#ifdef HAVE_", not "#if HAVE_". * libguile/socket.c (scm_setsockopt): Likewise.
This commit is contained in:
parent
c32b39b9cb
commit
56a3dcd431
13 changed files with 35 additions and 38 deletions
|
@ -96,7 +96,7 @@
|
|||
} \
|
||||
while (0)
|
||||
|
||||
#if SCM_STRING_LENGTH_HISTOGRAM
|
||||
#ifdef SCM_STRING_LENGTH_HISTOGRAM
|
||||
static size_t lenhist[1001];
|
||||
#endif
|
||||
|
||||
|
@ -114,7 +114,7 @@ make_stringbuf (size_t len)
|
|||
|
||||
SCM buf;
|
||||
|
||||
#if SCM_STRING_LENGTH_HISTOGRAM
|
||||
#ifdef SCM_STRING_LENGTH_HISTOGRAM
|
||||
if (len < 1000)
|
||||
lenhist[len]++;
|
||||
else
|
||||
|
@ -140,7 +140,7 @@ make_wide_stringbuf (size_t len)
|
|||
SCM buf;
|
||||
size_t raw_len;
|
||||
|
||||
#if SCM_STRING_LENGTH_HISTOGRAM
|
||||
#ifdef SCM_STRING_LENGTH_HISTOGRAM
|
||||
if (len < 1000)
|
||||
lenhist[len]++;
|
||||
else
|
||||
|
@ -972,7 +972,7 @@ SCM_DEFINE (scm_sys_symbol_dump, "%symbol-dump", 1, 0, 0, (SCM sym),
|
|||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
#if SCM_STRING_LENGTH_HISTOGRAM
|
||||
#ifdef SCM_STRING_LENGTH_HISTOGRAM
|
||||
|
||||
SCM_DEFINE (scm_sys_stringbuf_hist, "%stringbuf-hist", 0, 0, 0, (void), "")
|
||||
#define FUNC_NAME s_scm_sys_stringbuf_hist
|
||||
|
@ -1040,9 +1040,11 @@ SCM_DEFINE (scm_string, "string", 0, 0, 1,
|
|||
|
||||
if (wide == 0)
|
||||
{
|
||||
char *buf;
|
||||
|
||||
result = scm_i_make_string (len, NULL);
|
||||
result = scm_i_string_start_writing (result);
|
||||
char *buf = scm_i_string_writable_chars (result);
|
||||
buf = scm_i_string_writable_chars (result);
|
||||
while (len > 0 && scm_is_pair (rest))
|
||||
{
|
||||
SCM elt = SCM_CAR (rest);
|
||||
|
@ -1055,9 +1057,11 @@ SCM_DEFINE (scm_string, "string", 0, 0, 1,
|
|||
}
|
||||
else
|
||||
{
|
||||
scm_t_wchar *buf;
|
||||
|
||||
result = scm_i_make_wide_string (len, NULL);
|
||||
result = scm_i_string_start_writing (result);
|
||||
scm_t_wchar *buf = scm_i_string_writable_wide_chars (result);
|
||||
buf = scm_i_string_writable_wide_chars (result);
|
||||
while (len > 0 && scm_is_pair (rest))
|
||||
{
|
||||
SCM elt = SCM_CAR (rest);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue