* Patch: Some work towards making --disable-deprecated compile
@ 2009-03-28 12:06 Daniel Kraft
2009-04-05 18:21 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Kraft @ 2009-03-28 12:06 UTC (permalink / raw)
To: guile-devel
[-- Attachment #1: Type: text/plain, Size: 792 bytes --]
Hi,
here's my patch from last december to fix some internal inconsistencies
that prevented guile from compiling with --disable-deprecated at that
time. I've now my copyright assignment in place, so when it is ok you
could commit it at any time. The patch is updated to the current revision.
Now however there were some places where scm_sizet and SCM_LISTX
occurred (I guess after the vm merge) that seem to be deprecated, so for
a full build with --disable-deprecated I had to replace those by size_t
and scm_cons[2] & friends (I hope this is ok so). For this I've got a
seperate patch (but we could merge those, depending on your opinion).
Even then it does not build correct, but that seems to be a problem with
the manual; I will try to investigate here, too.
Yours,
Daniel
[-- Attachment #2: patch.changelog --]
[-- Type: text/plain, Size: 374 bytes --]
2009-03-28 Daniel Kraft <d@domob.eu>
* configure.in (enable_deprecated): Set SCM_WARN_DEPRECATED_DEFAULT
even when --disable-deprecated is passed.
* libguile/deprecation.h: Declare deprecation-issuing methods even
if SCM_ENABLE_DEPRECATED is not set.
* libguile/deprecation.c: Ditto.
(scm_init_deprecation): Include full body even for unset
SCM_ENABLE_DEPRECATED.
[-- Attachment #3: patch.diff --]
[-- Type: text/plain, Size: 3075 bytes --]
From 7d4386f6ba0d8c4a33aa8c22b189c3efa4b57266 Mon Sep 17 00:00:00 2001
From: daniel <daniel@dani.localdomain.invalid>
Date: Fri, 13 Feb 2009 14:27:41 +0100
Subject: [PATCH] Make --disable-deprected work
---
configure.in | 5 +++--
libguile/deprecation.c | 6 ------
libguile/deprecation.h | 11 +++--------
3 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/configure.in b/configure.in
index a7fd9c9..385f4d9 100644
--- a/configure.in
+++ b/configure.in
@@ -159,6 +159,7 @@ AC_ARG_ENABLE([deprecated],
if test "$enable_deprecated" = no; then
SCM_I_GSC_ENABLE_DEPRECATED=0
+ warn_default=no
else
if test "$enable_deprecated" = yes || test "$enable_deprecated" = ""; then
warn_default=summary
@@ -168,9 +169,9 @@ else
warn_default=$enable_deprecated
fi
SCM_I_GSC_ENABLE_DEPRECATED=1
- AC_DEFINE_UNQUOTED(SCM_WARN_DEPRECATED_DEFAULT, "$warn_default",
- [Define this to control the default warning level for deprecated features.])
fi
+AC_DEFINE_UNQUOTED(SCM_WARN_DEPRECATED_DEFAULT, "$warn_default",
+[Define this to control the default warning level for deprecated features.])
AC_ARG_ENABLE(elisp,
[ --disable-elisp omit Emacs Lisp support],,
diff --git a/libguile/deprecation.c b/libguile/deprecation.c
index 338c47c..780e246 100644
--- a/libguile/deprecation.c
+++ b/libguile/deprecation.c
@@ -41,8 +41,6 @@
\f
-#if (SCM_ENABLE_DEPRECATED == 1)
-
struct issued_warning {
struct issued_warning *prev;
const char *message;
@@ -138,8 +136,6 @@ print_deprecation_summary (void)
}
}
-#endif /* SCM_ENABLE_DEPRECATED == 1 */
-
SCM_DEFINE(scm_include_deprecated_features,
"include-deprecated-features", 0, 0, 0,
(),
@@ -157,7 +153,6 @@ SCM_DEFINE(scm_include_deprecated_features,
void
scm_init_deprecation ()
{
-#if (SCM_ENABLE_DEPRECATED == 1)
const char *level = getenv ("GUILE_WARN_DEPRECATED");
if (level == NULL)
level = SCM_WARN_DEPRECATED_DEFAULT;
@@ -170,7 +165,6 @@ scm_init_deprecation ()
SCM_WARN_DEPRECATED = 0;
atexit (print_deprecation_summary);
}
-#endif
#include "libguile/deprecation.x"
}
diff --git a/libguile/deprecation.h b/libguile/deprecation.h
index 7885327..05928b7 100644
--- a/libguile/deprecation.h
+++ b/libguile/deprecation.h
@@ -26,20 +26,15 @@
\f
-#if (SCM_ENABLE_DEPRECATED == 1)
-
-/* These functions are _not_ deprecated, but we exclude them along
- with the really deprecated features to be sure that no-one is
- trying to emit deprecation warnings when libguile is supposed to be
- clean of them.
+/* These functions are a possibly useful part of the API and not only used
+ internally, thus they are exported always, not depending on
+ SCM_ENABLE_DEPRECATED.
*/
SCM_API void scm_c_issue_deprecation_warning (const char *msg);
SCM_API void scm_c_issue_deprecation_warning_fmt (const char *msg, ...);
SCM_API SCM scm_issue_deprecation_warning (SCM msgs);
-#endif
-
SCM_API SCM scm_include_deprecated_features (void);
SCM_INTERNAL void scm_init_deprecation (void);
--
1.5.6.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Patch: Some work towards making --disable-deprecated compile
2009-03-28 12:06 Patch: Some work towards making --disable-deprecated compile Daniel Kraft
@ 2009-04-05 18:21 ` Ludovic Courtès
2009-04-07 15:56 ` Daniel Kraft
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2009-04-05 18:21 UTC (permalink / raw)
To: guile-devel
Hi Daniel,
Daniel Kraft <d@domob.eu> writes:
> here's my patch from last december to fix some internal
> inconsistencies that prevented guile from compiling with
> --disable-deprecated at that time. I've now my copyright assignment
> in place, so when it is ok you could commit it at any time. The patch
> is updated to the current revision.
Thanks! I've committed it with minor formatting changes:
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=6ab8238d99f477ee7ac12f1f1a3ec70aab3e68c7
BTW, next time, could you fix your Git user name and email configuration
(which appears in the patch), and provide the change log as part of the
Git log (so that the patch can be applied quickly with git-am(1))?
> Now however there were some places where scm_sizet and SCM_LISTX
> occurred (I guess after the vm merge) that seem to be deprecated, so
> for a full build with --disable-deprecated I had to replace those by
> size_t and scm_cons[2] & friends (I hope this is ok so). For this
> I've got a seperate patch (but we could merge those, depending on your
> opinion).
I stumbled upon this while trying to test the change with
`--disable-deprecated' and committed this:
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=da8b47478e08976ac4569a3030e43aa520e76b01
However, there's still another issue:
$ ./pre-inst-guile -q --debug -c 0
;;; Succeeds.
$ ./pre-inst-guile -q --debug -c '(use-modules (ice-9 r5rs))'
Backtrace:
In current input:
1: 0* (use-modules (ice-9 r5rs))
1: 1 (eval-when (eval load compile) (process-use-modules (list (list #))) ...)
1: 2 (begin (process-use-modules (list (list #))) *unspecified*)
?: 3* [process-use-modules (((ice-9 r5rs)))]
?: 4 (let* ((interfaces #)) (call-with-deferred-observers (lambda () #)))
?: 5* [map #<procedure #f (mif-args)> (((ice-9 r5rs)))]
?: 6* [#<procedure #f (mif-args)> ((ice-9 r5rs))]
?: 7* (or (apply resolve-interface mif-args) (error "no such module" mif-args))
?: 8* [apply #<procedure resolve-interface (name . args)> ((ice-9 r5rs))]
?: 9 [resolve-interface (ice-9 r5rs)]
...
?: 10 (let* (# # # # ...) (and # #) (if # public-i #))
?: 11* (and (or (not #) (not #)) (error "no code for module" name))
?: 12 [error "no code for module" (ice-9 r5rs)]
...
?: 13 [scm-error misc-error #f "~A ~S" ("no code for module" (ice-9 r5rs)) #f]
<unnamed port>: In procedure scm-error in expression (scm-error (quote misc-error) #f ...):
<unnamed port>: no code for module (ice-9 r5rs)
Looking with strace(1) shows that ice-9/r5rs.{scm,go} aren't loaded at
all here.
Ideas?
Thanks,
Ludo'.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch: Some work towards making --disable-deprecated compile
2009-04-05 18:21 ` Ludovic Courtès
@ 2009-04-07 15:56 ` Daniel Kraft
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Kraft @ 2009-04-07 15:56 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guile-devel
Ludovic Courtès wrote:
>> here's my patch from last december to fix some internal
>> inconsistencies that prevented guile from compiling with
>> --disable-deprecated at that time. I've now my copyright assignment
>> in place, so when it is ok you could commit it at any time. The patch
>> is updated to the current revision.
>
> Thanks! I've committed it with minor formatting changes:
>
> http://git.savannah.gnu.org/cgit/guile.git/commit/?id=6ab8238d99f477ee7ac12f1f1a3ec70aab3e68c7
Thank you very much, Ludo!
> BTW, next time, could you fix your Git user name and email configuration
> (which appears in the patch), and provide the change log as part of the
> Git log (so that the patch can be applied quickly with git-am(1))?
I will try so; unfortunatelly I'm still a little fighting with git, as
this was/is the first time for me to use it. And while I really like
the apparent features with regards to local branching and the like, I'm
just missing some experience working with it for now :)
> However, there's still another issue:
>
> $ ./pre-inst-guile -q --debug -c 0
> ;;; Succeeds.
>
> $ ./pre-inst-guile -q --debug -c '(use-modules (ice-9 r5rs))'
>
> Backtrace:
> In current input:
> 1: 0* (use-modules (ice-9 r5rs))
> 1: 1 (eval-when (eval load compile) (process-use-modules (list (list #))) ...)
> 1: 2 (begin (process-use-modules (list (list #))) *unspecified*)
> ?: 3* [process-use-modules (((ice-9 r5rs)))]
> ?: 4 (let* ((interfaces #)) (call-with-deferred-observers (lambda () #)))
> ?: 5* [map #<procedure #f (mif-args)> (((ice-9 r5rs)))]
> ?: 6* [#<procedure #f (mif-args)> ((ice-9 r5rs))]
> ?: 7* (or (apply resolve-interface mif-args) (error "no such module" mif-args))
> ?: 8* [apply #<procedure resolve-interface (name . args)> ((ice-9 r5rs))]
> ?: 9 [resolve-interface (ice-9 r5rs)]
> ...
> ?: 10 (let* (# # # # ...) (and # #) (if # public-i #))
> ?: 11* (and (or (not #) (not #)) (error "no code for module" name))
> ?: 12 [error "no code for module" (ice-9 r5rs)]
> ...
> ?: 13 [scm-error misc-error #f "~A ~S" ("no code for module" (ice-9 r5rs)) #f]
>
> <unnamed port>: In procedure scm-error in expression (scm-error (quote misc-error) #f ...):
> <unnamed port>: no code for module (ice-9 r5rs)
>
> Looking with strace(1) shows that ice-9/r5rs.{scm,go} aren't loaded at
> all here.
Hm... No ideas yet, but I will look into that problem now; and maybe I
can still find the solution, even though I'm not yet really
knowledge-able about Guile's code :D
Yours,
Daniel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-07 15:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-28 12:06 Patch: Some work towards making --disable-deprecated compile Daniel Kraft
2009-04-05 18:21 ` Ludovic Courtès
2009-04-07 15:56 ` Daniel Kraft
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).