|
From: Carlo W. <li...@us...> - 2002-02-15 05:19:44
|
CVSROOT : /cvsroot/libcw
Module : src
Commit time: 2002-01-15 05:19:42 UTC
Modified files:
libcwd/NEWS libcwd/acconfig.h libcwd/bfd.cc libcwd/configure.in
libcwd/documentation/styles/Makefile
libcwd/documentation/styles/defines.h
libcwd/documentation/styles/main.css
libcwd/documentation/tutorial/tut1.m4 libcwd/include/sys.ho.in
Log message:
Several bug fixes.
---------------------- diff included ----------------------
Index: src/libcwd/NEWS
diff -u src/libcwd/NEWS:1.69 src/libcwd/NEWS:1.70
--- src/libcwd/NEWS:1.69 Thu Feb 14 10:43:23 2002
+++ src/libcwd/NEWS Thu Feb 14 21:19:31 2002
@@ -1,3 +1,22 @@
+libcwd-0.99.17
+
+ Bug fixes:
+
+ Libcwd failed to find an executable in the current directory
+ when one of the command line parameters contained a '/'.
+
+ The tutorial had several occurances of '<' where '<' should
+ have been used, with as result that parts of example code didn't
+ show up in a browser.
+
+ `pthread_kill_other_threads_np' was not detected by ./configure.
+
+ Due to a problem with how RedHat ships fonts, using mozilla,
+ italic helvetica looks horrible. The documentation now uses
+ plain 'sans-serif' instead which will use the default font
+ that is defined under preferences -> appearance -> fonts.
+ This should be set to -adobe-helvetica-*-.
+
libcwd-0.99.16
* libcwd is now thread-safe *
Index: src/libcwd/acconfig.h
diff -u src/libcwd/acconfig.h:1.11 src/libcwd/acconfig.h:1.12
--- src/libcwd/acconfig.h:1.11 Sun Feb 10 19:00:24 2002
+++ src/libcwd/acconfig.h Thu Feb 14 21:19:31 2002
@@ -22,6 +22,9 @@
// Defined when both -lpthread and pthread.h could be found.
#undef LIBCWD_HAVE_PTHREAD
+// This is needed when using threading, for example to get `pthread_kill_other_threads_np'.
+#undef _GNU_SOURCE
+
// Defined when --enable-libcwd-threading is used.
#undef LIBCWD_THREAD_SAFE
@BOTTOM@
Index: src/libcwd/bfd.cc
diff -u src/libcwd/bfd.cc:1.102 src/libcwd/bfd.cc:1.103
--- src/libcwd/bfd.cc:1.102 Thu Feb 14 10:43:23 2002
+++ src/libcwd/bfd.cc Thu Feb 14 21:19:31 2002
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.102 2002/02/14 18:43:23 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.103 2002/02/15 05:19:31 libcw Exp $
//
// Copyright (C) 2000 - 2001, by
//
@@ -782,15 +782,16 @@
DoutFatal(dc::fatal|error_cf, "Failed to execute \"" << ps_prog << "\"");
}
- //std::cerr << "argv0 = \"" << argv0 << '"' << std::endl;
- if (argv0.find('/') != 0)
+ argv0 += '\0';
+ // argv0 now contains a zero terminated string optionally followed by the command line
+ // arguments (which is why we can't use argv0.find('/') here), all seperated by the 0 character.
+ if (!strchr(argv0.data(), '/'))
{
_private_::ST_internal_string prog_name(argv0);
_private_::ST_internal_string path_list(getenv("PATH"));
_private_::ST_internal_string::size_type start_pos = 0, end_pos;
_private_::ST_internal_string path;
struct stat finfo;
- prog_name += '\0';
for (;;)
{
end_pos = path_list.find(':', start_pos);
Index: src/libcwd/configure.in
diff -u src/libcwd/configure.in:1.103 src/libcwd/configure.in:1.104
--- src/libcwd/configure.in:1.103 Tue Feb 12 21:41:24 2002
+++ src/libcwd/configure.in Thu Feb 14 21:19:32 2002
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_REVISION($Revision: 1.103 $)dnl
+AC_REVISION($Revision: 1.104 $)dnl
dnl General intialization of `autoconf' varaibles.
dnl Ensure that the directory specified with --srcdir was correct
@@ -368,13 +368,6 @@
* include posix threads by itself and I can't find -lpthread.
* Use --disable-libcwd-threading to compile a libcwd that is not thread safe.
])])
- AC_LANG_RESTORE
- CW_CONFIG_THREAD_SAFE=define
- SAVE_LIBS="$LIBS"
- LIBS="$LIBS $LIB_THREADS"
- AC_CHECK_FUNCS(pthread_kill_other_threads_np)
- LIBS="$SAVE_LIBS"
-
if test "$ac_cv_search_pthread_create" = "none required"; then
dnl Even if nothing is required, we still need to use -lpthread explicitly
dnl while linking a shared library, otherwise the versioning info of
@@ -382,6 +375,17 @@
dnl itself even!.
AC_CHECK_LIB(pthread, pthread_create, [LIB_THREADS_SHARED=-lpthread])
fi
+
+ AC_LANG_RESTORE
+ CW_CONFIG_THREAD_SAFE=define
+
+ dnl pthread_kill_other_threads_np is a GNU extension, therefore we need to
+ dnl define _GNU_SOURCE. The extension also needs -lpthread to be available.
+ AC_DEFINE_UNQUOTED(_GNU_SOURCE, "1")
+ SAVE_LIBS="$LIBS"
+ LIBS="$LIBS $LIB_THREADS $LIB_THREADS_SHARED"
+ AC_CHECK_FUNCS(pthread_kill_other_threads_np)
+ LIBS="$SAVE_LIBS"
fi
dnl This test needs the full set of libraries we just determined.
Index: src/libcwd/documentation/styles/Makefile
diff -u src/libcwd/documentation/styles/Makefile:1.2 src/libcwd/documentation/styles/Makefile:1.3
--- src/libcwd/documentation/styles/Makefile:1.2 Sat Dec 29 20:17:48 2001
+++ src/libcwd/documentation/styles/Makefile Thu Feb 14 21:19:32 2002
@@ -4,15 +4,15 @@
all: $(OUTPUT)
-%/main.css: main.css
+%/main.css: main.css defines.h
@MACRO=`echo $@ | sed -e 's%\([^/]*\)/.*%\1%' | tr a-z A-Z`; \
cat main.css | gcc -D$$MACRO -E -c - | egrep -v '^(#|$$)' > $@
-%/doxygen.css: doxygen.css
+%/doxygen.css: doxygen.css defines.h
@MACRO=`echo $@ | sed -e 's%\([^/]*\)/.*%\1%' | tr a-z A-Z`; \
cat doxygen.css | gcc -D$$MACRO -E -c - | egrep -v '^(#|$$)' > $@
-%/tutorial.css: tutorial.css
+%/tutorial.css: tutorial.css defines.h
@MACRO=`echo $@ | sed -e 's%\([^/]*\)/.*%\1%' | tr a-z A-Z`; \
cat tutorial.css | gcc -D$$MACRO -E -c - | egrep -v '^(#|$$)' > $@
Index: src/libcwd/documentation/styles/defines.h
diff -u src/libcwd/documentation/styles/defines.h:1.2 src/libcwd/documentation/styles/defines.h:1.3
--- src/libcwd/documentation/styles/defines.h:1.2 Sat Dec 29 20:17:48 2001
+++ src/libcwd/documentation/styles/defines.h Thu Feb 14 21:19:32 2002
@@ -23,6 +23,13 @@
#endif
#define NORMAL_FONT font-family: arial, sans-serif; font-size: NORMAL_SIZE; font-size-adjust: none
+/* Don't use helvetica, it is broken on RedHat which has an alias "-alias-helvetica-medium-i-normal--*-iso8859-1"
+ * installed that is actually a horrible looking japanese font. See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=59911 */
+#ifndef IE
+#define NORMAL_ITALICS_FONT font-family: sans-serif; font-size: NORMAL_SIZE; font-size-adjust: none
+#else
+#define NORMAL_ITALICS_FONT NORMAL_FONT
+#endif
#ifdef KONQUEROR
#define HSIZE1 24pt
Index: src/libcwd/documentation/styles/main.css
diff -u src/libcwd/documentation/styles/main.css:1.2 src/libcwd/documentation/styles/main.css:1.3
--- src/libcwd/documentation/styles/main.css:1.2 Sat Dec 29 20:17:48 2001
+++ src/libcwd/documentation/styles/main.css Thu Feb 14 21:19:32 2002
@@ -216,3 +216,11 @@
font-size : NORMAL_SIZE;
}
+I {
+ NORMAL_ITALICS_FONT
+}
+
+EM {
+ NORMAL_ITALICS_FONT
+}
+
Index: src/libcwd/documentation/tutorial/tut1.m4
diff -u src/libcwd/documentation/tutorial/tut1.m4:1.5 src/libcwd/documentation/tutorial/tut1.m4:1.6
--- src/libcwd/documentation/tutorial/tut1.m4:1.5 Thu Feb 14 15:32:12 2002
+++ src/libcwd/documentation/tutorial/tut1.m4 Thu Feb 14 21:19:32 2002
@@ -13,14 +13,16 @@
<P>Compile as: <SPAN class="shell-command">g++ -g -DCWDEBUG hello_world.cc -lcwd -o hello_world</SPAN></P>
<PRE>
-#define _GNU_SOURCE // This must be defined before including <libcw/sysd.h>
-#include <libcw/sysd.h> // This must be the first header file
+// These two lines should actually be part of a custom "sys.h" file. See <A HREF="tut2.html">tutorial 2</A>.
+#define _GNU_SOURCE // This must be defined before including <libcw/sysd.h>
+#include <libcw/sysd.h> // This must be the first header file
+// This line should actually be part of a custom "debug.h" file. See <A HREF="tut2.html">tutorial 2</A>.
#include <libcw/debug.h>
int main(void)
{
- Debug( dc::notice.on() ); // Turn on the NOTICE Debug Channel
- Debug( libcw_do.on() ); // Turn on the default Debug Object
+ Debug( dc::notice.on() ); // Turn on the NOTICE Debug Channel.
+ Debug( libcw_do.on() ); // Turn on the default Debug Object.
Dout( dc::notice, "Hello World" );
@@ -37,7 +39,7 @@
In order to make you explicitely aware of the fact that it is
defined, libcwd does not define this macro itself (which it could do inside <libcw/sysd.h>),
but forces you to define it when using libcwd.
-Note you only really have to define it when you compiled libcwd with
+Note that you only really have to define it when you compiled libcwd with
threading support.
If you do not define this macro and libcwd needs it, then you will get
a compile error in <libcw/sysd.h> telling you so.</P>
Index: src/libcwd/include/sys.ho.in
diff -u src/libcwd/include/sys.ho.in:1.7 src/libcwd/include/sys.ho.in:1.8
--- src/libcwd/include/sys.ho.in:1.7 Tue Jan 8 15:04:59 2002
+++ src/libcwd/include/sys.ho.in Thu Feb 14 21:19:32 2002
@@ -1,5 +1,5 @@
// @configure_input@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/include/sys.ho.in,v 1.7 2002/01/08 23:04:59 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/include/sys.ho.in,v 1.8 2002/02/15 05:19:32 libcw Exp $
//
// Copyright (C) 2000 - 2001, by
//
@@ -20,7 +20,7 @@
//
// Use all GNU extensions.
//
-#ifndef _GNU_SOURCE
+#if !defined(_GNU_SOURCE) && defined(LIBCWD_THREAD_SAFE)
#define _GNU_SOURCE
#endif
----------------------- End of diff -----------------------
|