[evlog-dev] (patch) allow evlog to be compiled in separate directory
dmitry pervushin <[email protected]> Wed, 09 Mar 2005 18:32:08 +0300
| Newsgroups | gmane.linux.kernel.event-logging |
|---|---|
| Organization | montavista |
| Message-ID | <[email protected]> |
Hi evlog-developers,
I propose the patch (attached below) to achieve the following goals
1. allow evlog to be compiled with gcc version 3.xx ( I have 3.4.3 )
2. allow evlog to be built in separate directory
diff -uNr evlog-1.6.1/user/cmd/ela/Makefile.am
evlog-1.6.1-mvista/user/cmd/ela/Makefile.am
--- evlog-1.6.1/user/cmd/ela/Makefile.am 2004-12-29 01:19:17.000000000
+0300
+++ evlog-1.6.1-mvista/user/cmd/ela/Makefile.am 2005-02-25
18:14:42.000000000 +0300
@@ -5,7 +5,7 @@
DISTCLEANFILES +=
MAINTAINERCLEANFILES +=
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
EXTRA_DIST += ela ela_crt_rpt ela_sig ela_funcs ela_console
ela_hw_alert\
ela_show ela_show_all ela_vpd_funcs\
diff -uNr evlog-1.6.1/user/cmd/evlactiond/Makefile.am
evlog-1.6.1-mvista/user/cmd/evlactiond/Makefile.am
--- evlog-1.6.1/user/cmd/evlactiond/Makefile.am 2004-02-21
06:59:09.000000000 +0300
+++ evlog-1.6.1-mvista/user/cmd/evlactiond/Makefile.am 2005-02-25
18:14:52.000000000 +0300
@@ -13,7 +13,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
sbin_PROGRAMS := evlactiond
evlactiond_SOURCES := evlactiond.h evlactiond.c
diff -uNr evlog-1.6.1/user/cmd/evlconfig/Makefile.am
evlog-1.6.1-mvista/user/cmd/evlconfig/Makefile.am
--- evlog-1.6.1/user/cmd/evlconfig/Makefile.am 2004-04-28
21:44:22.000000000 +0400
+++ evlog-1.6.1-mvista/user/cmd/evlconfig/Makefile.am 2005-02-25
18:15:06.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
AM_CFLAGS = @CFLAGS@
sbin_PROGRAMS := evlconfig
diff -uNr evlog-1.6.1/user/cmd/evlfacility/Makefile.am
evlog-1.6.1-mvista/user/cmd/evlfacility/Makefile.am
--- evlog-1.6.1/user/cmd/evlfacility/Makefile.am 2004-02-21
07:00:15.000000000 +0300
+++ evlog-1.6.1-mvista/user/cmd/evlfacility/Makefile.am 2005-02-25
18:15:15.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
sbin_PROGRAMS := evlfacility
evlfacility_SOURCES := evlfacility.c
diff -uNr evlog-1.6.1/user/cmd/evlgentmpls/Makefile.am
evlog-1.6.1-mvista/user/cmd/evlgentmpls/Makefile.am
--- evlog-1.6.1/user/cmd/evlgentmpls/Makefile.am 2004-02-21
07:00:59.000000000 +0300
+++ evlog-1.6.1-mvista/user/cmd/evlgentmpls/Makefile.am 2005-02-25
18:15:24.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
sbin_PROGRAMS := evlgentmpls
evlgentmpls_SOURCES := evlgentmpls.c
diff -uNr evlog-1.6.1/user/cmd/evlnotify/Makefile.am
evlog-1.6.1-mvista/user/cmd/evlnotify/Makefile.am
--- evlog-1.6.1/user/cmd/evlnotify/Makefile.am 2004-02-21
07:01:28.000000000 +0300
+++ evlog-1.6.1-mvista/user/cmd/evlnotify/Makefile.am 2005-02-25
18:15:31.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
sbin_PROGRAMS := evlnotify
evlnotify_SOURCES := evlnotify.c
diff -uNr evlog-1.6.1/user/cmd/evlnotifyd/evlnotifyd.c
evlog-1.6.1-mvista/user/cmd/evlnotifyd/evlnotifyd.c
--- evlog-1.6.1/user/cmd/evlnotifyd/evlnotifyd.c 2004-03-24
01:18:23.000000000 +0300
+++ evlog-1.6.1-mvista/user/cmd/evlnotifyd/evlnotifyd.c 2005-02-25
20:40:29.517168273 +0300
@@ -113,7 +113,10 @@
/* Init clients info array */
initClients();
-
+
+ /* unlink notify server address */
+ (void) unlink(EVLNOTIFYD_SERVER_SOCKET);
+
/*
* Create the list with the first node is empty (NULL).
* This first node will always exist from now on.
diff -uNr evlog-1.6.1/user/cmd/evlnotifyd/Makefile.am
evlog-1.6.1-mvista/user/cmd/evlnotifyd/Makefile.am
--- evlog-1.6.1/user/cmd/evlnotifyd/Makefile.am 2004-03-24
01:18:23.000000000 +0300
+++ evlog-1.6.1-mvista/user/cmd/evlnotifyd/Makefile.am 2005-02-25
18:15:39.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
AM_CFLAGS = @CFLAGS@ -D_EVL_WRITE_DIRECT
sbin_PROGRAMS := evlnotifyd
diff -uNr evlog-1.6.1/user/cmd/evlnotifyd/test/Makefile.am
evlog-1.6.1-mvista/user/cmd/evlnotifyd/test/Makefile.am
--- evlog-1.6.1/user/cmd/evlnotifyd/test/Makefile.am 2003-12-19
20:14:03.000000000 +0300
+++ evlog-1.6.1-mvista/user/cmd/evlnotifyd/test/Makefile.am 2005-02-25
18:18:11.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/kernel/@KERN_VERSION@/include
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/kernel/@KERN_VERSION@/include -I../../../include
noinst_PROGRAMS := testclient test testnull
LDADD := ../../../lib/.libs/libevl.a
diff -uNr evlog-1.6.1/user/cmd/evlogd/Makefile.am
evlog-1.6.1-mvista/user/cmd/evlogd/Makefile.am
--- evlog-1.6.1/user/cmd/evlogd/Makefile.am 2004-02-21
07:05:25.000000000 +0300
+++ evlog-1.6.1-mvista/user/cmd/evlogd/Makefile.am 2005-02-25
18:15:48.000000000 +0300
@@ -26,7 +26,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
sbin_PROGRAMS := evlogd evlogrmtd
diff -uNr evlog-1.6.1/user/cmd/evlogmgr/Makefile.am
evlog-1.6.1-mvista/user/cmd/evlogmgr/Makefile.am
--- evlog-1.6.1/user/cmd/evlogmgr/Makefile.am 2004-02-21
07:06:00.000000000 +0300
+++ evlog-1.6.1-mvista/user/cmd/evlogmgr/Makefile.am 2005-02-25
18:15:56.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
sbin_PROGRAMS := evlogmgr
evlogmgr_SOURCES := evl_logmgmt.h evlogmgr.c evl_logmgmt.c
diff -uNr evlog-1.6.1/user/cmd/evlsend/Makefile.am
evlog-1.6.1-mvista/user/cmd/evlsend/Makefile.am
--- evlog-1.6.1/user/cmd/evlsend/Makefile.am 2004-02-21
07:06:26.000000000 +0300
+++ evlog-1.6.1-mvista/user/cmd/evlsend/Makefile.am 2005-02-25
18:16:04.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
sbin_PROGRAMS := evlsend
evlsend_SOURCES := evlsend.c
diff -uNr evlog-1.6.1/user/cmd/evltc/Makefile.am
evlog-1.6.1-mvista/user/cmd/evltc/Makefile.am
--- evlog-1.6.1/user/cmd/evltc/Makefile.am 2004-02-21 07:06:51.000000000
+0300
+++ evlog-1.6.1-mvista/user/cmd/evltc/Makefile.am 2005-02-25
18:16:11.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
sbin_PROGRAMS := evltc
evltc_SOURCES := evltc.c funcs.c
diff -uNr evlog-1.6.1/user/cmd/evlview/Makefile.am
evlog-1.6.1-mvista/user/cmd/evlview/Makefile.am
--- evlog-1.6.1/user/cmd/evlview/Makefile.am 2004-02-21
07:07:24.000000000 +0300
+++ evlog-1.6.1-mvista/user/cmd/evlview/Makefile.am 2005-02-25
18:16:22.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
sbin_PROGRAMS := evlview
evlview_SOURCES := evlview.c specfmt.c
diff -uNr evlog-1.6.1/user/include/evlog.h.in
evlog-1.6.1-mvista/user/include/evlog.h.in
--- evlog-1.6.1/user/include/evlog.h.in 2004-09-24 22:27:12.000000000
+0400
+++ evlog-1.6.1-mvista/user/include/evlog.h.in 2005-02-23
20:09:41.000000000 +0300
@@ -202,8 +202,11 @@
#define syslogat(priority, fmt, ...) \
do { \
static struct evlog_info __attribute__((section(".log"),unused)) ___ \
- = { fmt, __stringify(EVL_FACILITY_NAME), _EVLOG_POS }; \
+ = { fmt, __stringify(EVL_FACILITY_NAME) }; \
+ ___.pos.line = __LINE__; \
char *unbraced_fmt = _evl_unbrace(fmt); \
+ strncpy( ___.pos.function, __FUNCTION__,
sizeof( ___.pos.function ) ); \
+ strncpy(___.pos.file,__FILE__, sizeof( ___.pos.file )) ; \
if (_evl_syslogat(priority, __stringify(EVL_FACILITY_NAME), \
evl_gen_event_type(__FILE__, __FUNCTION__, fmt), \
fmt, unbraced_fmt, ##__VA_ARGS__) != 1) \
diff -uNr evlog-1.6.1/user/lib/Makefile.am
evlog-1.6.1-mvista/user/lib/Makefile.am
--- evlog-1.6.1/user/lib/Makefile.am 2004-04-28 21:43:09.000000000 +0400
+++ evlog-1.6.1-mvista/user/lib/Makefile.am 2005-02-25
18:06:19.000000000 +0300
@@ -13,7 +13,7 @@
EXTRA_DIST += $(LIBEVLEXTRAFILES) Makefile.mk
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../include
AM_CFLAGS = @CFLAGS@
# Libraries
diff -uNr evlog-1.6.1/user/lib/template/convert.c
evlog-1.6.1-mvista/user/lib/template/convert.c
--- evlog-1.6.1/user/lib/template/convert.c 2004-12-15
20:05:46.000000000 +0300
+++ evlog-1.6.1-mvista/user/lib/template/convert.c 2005-02-23
19:50:45.000000000 +0300
@@ -245,6 +245,7 @@
}
break;
default:
+ break;
}
}
diff -uNr evlog-1.6.1/user/lib/template/Makefile.am
evlog-1.6.1-mvista/user/lib/template/Makefile.am
--- evlog-1.6.1/user/lib/template/Makefile.am 2004-02-21
07:09:00.000000000 +0300
+++ evlog-1.6.1-mvista/user/lib/template/Makefile.am 2005-02-25
18:03:51.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES += lex.tt.c tt.tab.h tt.tab.c
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
lex.tt.c: tmpllex.l
flex -Ptt $(top_srcdir)/user/lib/template/tmpllex.l
diff -uNr evlog-1.6.1/user/lib/test/bitfields/Makefile.am
evlog-1.6.1-mvista/user/lib/test/bitfields/Makefile.am
--- evlog-1.6.1/user/lib/test/bitfields/Makefile.am 2004-03-24
00:57:19.000000000 +0300
+++ evlog-1.6.1-mvista/user/lib/test/bitfields/Makefile.am 2005-02-25
18:09:19.000000000 +0300
@@ -13,7 +13,7 @@
MOSTLYCLEANFILES += bftest.c bftestN.c bftestU.c bftestUN.c bftestS.c
bftestSN.c
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../../include
bitfields_testdir := $(localstatedir)/test
bitfields_test_PROGRAMS := bftest bftestSN
@@ -34,23 +34,27 @@
LDADD := ../../libevl.la
-# FIXME: This should be done at configure time.
-# These rules also create the corresponding .t files (bftest.t or
bftestU.t).
-bftest.c: mktest.sh bftest.cpre bftest.cpost bftest.tpre bftest.tpost
mkc.awk mkt.awk
- ./mktest.sh
+bftest.c:mktest.sh bftest.cpre bftest.cpost bftest.tpre bftest.tpost
mkc.awk mkt.awk
+ pushd $(top_srcdir)/user/lib/test/bitfields/; ./mktest.sh; popd
+ cp $(top_srcdir)/user/lib/test/bitfields/bftest.c .
bftestN.c: mktest.sh bftest.cpre bftest.cpost bftest.tpre bftest.tpost
mkc.awk mkt.awk
- ./mktest.sh -n
+ pushd $(top_srcdir)/user/lib/test/bitfields/; ./mktest.sh -n; popd
+ cp $(top_srcdir)/user/lib/test/bitfields/bftestN.c .
bftestU.c: mktest.sh bftest.cpre bftest.cpost bftest.tpre bftest.tpost
mkc.awk mkt.awk
- ./mktest.sh -u
+ pushd $(top_srcdir)/user/lib/test/bitfields/; ./mktest.sh -u; popd
+ cp $(top_srcdir)/user/lib/test/bitfields/bftestU.c .
bftestUN.c: mktest.sh bftest.cpre bftest.cpost bftest.tpre bftest.tpost
mkc.awk mkt.awk
- ./mktest.sh -u -n
+ pushd $(top_srcdir)/user/lib/test/bitfields/; ./mktest.sh -u -n; popd
+ cp $(top_srcdir)/user/lib/test/bitfields/bftestUN.c .
bftestS.c: mktest.sh bftest.cpre bftest.cpost bftest.tpre bftest.tpost
mkc.awk mkt.awk
- ./mktest.sh -s
+ pushd $(top_srcdir)/user/lib/test/bitfields/; ./mktest.sh -s; popd
+ cp $(top_srcdir)/user/lib/test/bitfields/bftestS.c .
bftestSN.c: mktest.sh bftest.cpre bftest.cpost bftest.tpre bftest.tpost
mkc.awk mkt.awk
- ./mktest.sh -s -n
+ pushd $(top_srcdir)/user/lib/test/bitfields/; ./mktest.sh -s -n ; popd
+ cp $(top_srcdir)/user/lib/test/bitfields/bftestSN.c .
diff -uNr evlog-1.6.1/user/lib/test/Makefile.am
evlog-1.6.1-mvista/user/lib/test/Makefile.am
--- evlog-1.6.1/user/lib/test/Makefile.am 2004-03-24 00:56:04.000000000
+0300
+++ evlog-1.6.1-mvista/user/lib/test/Makefile.am 2005-02-25
18:12:15.000000000 +0300
@@ -62,7 +62,7 @@
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
testsdir = $(localstatedir)/test
diff -uNr evlog-1.6.1/user/lib/test/threadTest2.c
evlog-1.6.1-mvista/user/lib/test/threadTest2.c
--- evlog-1.6.1/user/lib/test/threadTest2.c 2003-03-18
00:47:17.000000000 +0300
+++ evlog-1.6.1-mvista/user/lib/test/threadTest2.c 2005-02-25
20:44:07.864582010 +0300
@@ -24,7 +24,7 @@
* (which in turn calls posix_log_vprintf).
*/
-#define MAX_THREADS (PTHREAD_THREADS_MAX-2)
+#define MAX_THREADS (_POSIX_THREAD_THREADS_MAX - 2)
struct workerStats {
pthread_t tid;
diff -uNr evlog-1.6.1/user/lib/test/threadTest.c
evlog-1.6.1-mvista/user/lib/test/threadTest.c
--- evlog-1.6.1/user/lib/test/threadTest.c 2002-03-26 00:19:05.000000000
+0300
+++ evlog-1.6.1-mvista/user/lib/test/threadTest.c 2005-02-25
20:43:58.066493019 +0300
@@ -33,7 +33,7 @@
*
*/
-#define MAX_THREADS (PTHREAD_THREADS_MAX-2)
+#define MAX_THREADS (_POSIX_THREAD_THREADS_MAX - 2)
struct workerStats {
pthread_t tid;
diff -uNr evlog-1.6.1/user/lib/util/format.c
evlog-1.6.1-mvista/user/lib/util/format.c
--- evlog-1.6.1/user/lib/util/format.c 2004-04-30 04:27:56.000000000
+0400
+++ evlog-1.6.1-mvista/user/lib/util/format.c 2005-02-23
19:51:45.000000000 +0300
@@ -286,7 +286,8 @@
seg->u.fs_attname = nsaName;
seg->u2.fs_attribute = NULL;
break;
- default:
+ default:
+ break;
}
seg->fs_userfmt = attrFmt;
if (attrFmt
@@ -475,7 +476,8 @@
*/
size += _evlGetMaxDumpLen();
break;
- default:
+ default:
+ break;
}
p = p->li_next;
} while (p != head);
@@ -667,7 +669,7 @@
case TY_INT: return TY_UINT;
case TY_LONG: return TY_ULONG;
case TY_LONGLONG: return TY_ULONGLONG;
- default:
+ default: break;
}
return ty;
}
diff -uNr evlog-1.6.1/user/lib/util/Makefile.am
evlog-1.6.1-mvista/user/lib/util/Makefile.am
--- evlog-1.6.1/user/lib/util/Makefile.am 2004-02-21 07:11:10.000000000
+0300
+++ evlog-1.6.1-mvista/user/lib/util/Makefile.am 2005-02-25
18:05:04.000000000 +0300
@@ -11,7 +11,7 @@
MOSTLYCLEANFILES +=
# General compilation flags
-INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux
+INCLUDES = -I$(top_srcdir)/user/include -I
$(top_srcdir)/user/include/linux -I../../include
evlutil_sources := scanner.c evl_list.c format.c fmtbuf.c evl_common.c
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click