[evlog-dev] Cleanup patches

Benoit Guillon <[email protected]> Thu, 22 Apr 2004 12:06:22 +0200
Newsgroups gmane.linux.kernel.event-logging
Message-ID <[email protected]>
Il s'agit d'un message multivolet au format MIME.
--------------24088ED7EF95AFAAABBC2E54
Content-Type: multipart/alternative;
 boundary="------------CEA8D235B6EFCB6153B9FB2E"


--------------CEA8D235B6EFCB6153B9FB2E
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: Quoted-Printable

Hello,

I have been trying to port evlog to another platform (PowerPC lynx 4.0
targets) to have the user functionnalities (kernel log is not in the
scope). The compilation warning level is high so that I've tried to
clean the code to remove them.

I attach the patches for lib and include sources, with a text explaining
the changes done so that you can decide which change is good to take.

I hope it can be of some use,

Bye,

--
Beno=EEt Guillon                [email protected]



--------------CEA8D235B6EFCB6153B9FB2E
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7Bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hello,
<p>I have been trying to port evlog to another platform (PowerPC lynx 4.0
targets) to have the user functionnalities (kernel log is not in the scope).
The compilation warning level is high so that I've tried to clean the code
to remove them.
<p>I attach the patches for lib and include sources, with a text explaining
the changes done so that you can decide which change is good to take.
<p>I hope it can be of some use,
<p>Bye,
<pre>--
Beno&icirc;t Guillon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [email protected]&nbsp;
</pre>
&nbsp;</html>

--------------CEA8D235B6EFCB6153B9FB2E--

--------------24088ED7EF95AFAAABBC2E54
Content-Type: text/plain; charset=us-ascii;
 name="lib.patch"
Content-Disposition: inline;
 filename="lib.patch"
Content-Transfer-Encoding: 7Bit

diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/evl_log_write.c ./evl_log_write.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/evl_log_write.c	Wed Mar 31 02:35:51 2004
+++ ./evl_log_write.c	Thu Apr 22 09:56:00 2004
@@ -23,6 +23,7 @@
  *  Project Website:  http://evlog.sourceforge.net/
  *
  */
+#include "config.h"
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -35,6 +36,8 @@
 #include <time.h>
 #include <pwd.h>
 #include <grp.h>
+
+#include <ctype.h>
 #include <sys/klog.h>
 
 #include "evlog.h"
@@ -313,6 +316,7 @@
 					d = packWstring(d, s, &reclen);
                                 }
                             } /* end of TY_WSTRING case */
+                        default:
                         } /* end of switch */
                 } /* not array */
         } /* next att_type */
@@ -640,6 +644,7 @@
 		status = 0;
 		break;
 	    }
+        default:
 	}
 
 	return status;
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/facreg.c ./facreg.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/facreg.c	Wed Mar 31 02:35:51 2004
+++ ./facreg.c	Thu Apr 22 09:39:05 2004
@@ -49,10 +49,10 @@
 
 #include <stdlib.h>
 #include <sys/types.h>
-#include <stdio.h>
 #include <string.h>
 #include <malloc.h>
 #include <stdarg.h>
+#include <stdio.h>
 #include <assert.h>
 #include <errno.h>
 #include <signal.h>
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/formatrec.c ./formatrec.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/formatrec.c	Wed Mar 31 02:35:51 2004
+++ ./formatrec.c	Thu Apr 22 09:39:05 2004
@@ -23,6 +23,7 @@
  *  Project Website:  http://evlog.sourceforge.net/
  *
  */
+#include "config.h"
 
 #include <stdio.h>
 #include <string.h>
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/posix1.c ./posix1.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/posix1.c	Wed Mar 31 02:35:51 2004
+++ ./posix1.c	Thu Apr 22 09:39:05 2004
@@ -43,10 +43,13 @@
 #include "config.h"
 #include "posix_evlog.h"
 #include "posix_evlsup.h"
+#include "evl_common.h"
 #include "query/evl_parse.h"
 
 #include "evlog.h"
 
+#define GETPW_R_SIZE_MAX 128
+#define GETGR_R_SIZE_MAX 128
 /*
  * posix1.c implements the functions in the POSIX 1003.25 Event Logging API.
  * posix2.c provides support for these functions.  In particular, the functions
@@ -814,11 +817,15 @@
 	    {
 #ifdef _POSIX_THREAD_SAFE_FUNCTIONS
 		struct passwd *pw, passwd;
-		char buf[_SC_GETPW_R_SIZE_MAX];
+		char buf[GETPW_R_SIZE_MAX];
 		/* If host is a rmt host - don't resolve the user name */
 		if ((entry->log_processor >> 16) != 0) goto _rmt_user_exit; 
+#ifndef __Lynx__
 		(void) getpwuid_r(entry->log_uid, &passwd, buf,
-			_SC_GETPW_R_SIZE_MAX, &pw);
+			                GETPW_R_SIZE_MAX, &pw);
+#else
+		pw = getpwuid_r(&passwd, entry->log_uid, buf, GETPW_R_SIZE_MAX);
+#endif
 #else
 	    	struct passwd *pw;
 		/* If host is a rmt host - don't resolve the user name */
@@ -837,9 +844,13 @@
 	    {
 #ifdef _POSIX_THREAD_SAFE_FUNCTIONS
 		struct group *gr, group;
-		char buf[_SC_GETGR_R_SIZE_MAX];
+		char buf[GETGR_R_SIZE_MAX];
+#ifndef __Lynx__
 		(void) getgrgid_r(entry->log_gid, &group, buf,
-			_SC_GETGR_R_SIZE_MAX, &gr);
+                			GETGR_R_SIZE_MAX, &gr);
+#else
+		gr = getgrgid_r(&group, entry->log_gid, buf, GETGR_R_SIZE_MAX);
+#endif
 #else
 	    	struct group *gr = getgrgid(entry->log_gid);
 #endif
@@ -1039,7 +1050,7 @@
 	}
 	
 
-	memcpy(&newReq.nwSigevent, notification, sizeof(sigevent_t));
+	memcpy(&newReq.nwSigevent, notification, sizeof(struct sigevent));
 	newReq.nwFlags = flags;
 	if (write(_evl_nfy_sd, &newReq, EVL_NFY_MSGMAXSIZE) <= 0) {
 		/* socket is broken */
@@ -1225,7 +1236,7 @@
 	}
 	
 	/* Per the standard, we store these values only on success. */
-	memcpy(notification, &returnReq.nwSigevent, sizeof(sigevent_t));
+	memcpy(notification, &returnReq.nwSigevent, sizeof(struct sigevent));
 	*flags = returnReq.nwFlags;
 
 err_exit:
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/posix2.c ./posix2.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/posix2.c	Wed Mar 31 02:36:09 2004
+++ ./posix2.c	Thu Apr 22 09:39:05 2004
@@ -42,6 +42,7 @@
 #include "config.h"
 #include "posix_evlog.h"
 #include "posix_evlsup.h"
+#include "evl_common.h"
 #include "evlog.h"
 #include "evl_list.h"
 
@@ -587,7 +588,7 @@
 	if ((n = connect(sd, (struct sockaddr *)sa, sock_len) < 0)) {
 		if (errno != EINPROGRESS) {
 //			(void)fprintf(stderr, "Failed to connect to the daemon. errno=%d.\n", errno);
-			return -EAGAIN;
+      goto err_connect;
 		}	
 	}
 
@@ -603,8 +604,7 @@
 
 	if ((n = select(sd + 1, &rset, &wset, NULL, nsec? &tval : NULL)) == 0) {
 		/* time out */
-		close(sd);
-		return -EAGAIN;
+    goto err_connect;
 	}
 
 	if (FD_ISSET(sd, &rset) || FD_ISSET(sd, &wset)) {
@@ -612,10 +612,10 @@
 		if (getsockopt(sd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) {
 			/* some error */
 			(void)fprintf(stderr, "Error connecting to the daemon.\n");
-			return -EAGAIN;
+      goto err_connect;
 		}
 	} else {
-		return -EAGAIN;
+    goto err_connect;
 	} 
 
 done:
@@ -628,6 +628,10 @@
 		return -EAGAIN;
 	}	
 	return sd;
+
+err_connect:
+  close(sd);
+  return -EAGAIN;
 }
 
 int 
@@ -709,7 +713,8 @@
 
 	sd = getSdByPid(entry->log_pid);
 	if (sd < 0) {
-		return ECONNREFUSED;
+		ret = ECONNREFUSED;
+                goto unlock_and_exit;
 	}
 
 	ret = _evlWriteEx2(sd, entry, buf);
@@ -728,6 +733,7 @@
 		close(sd);	
 		zapSd(sd);
 	}
+unlock_and_exit:
 	if (sigsBlocked) {
 		_evlRestoreSignals(&oldset);
 	}
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/posix_evlsup.c ./posix_evlsup.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/posix_evlsup.c	Wed Mar 31 02:35:51 2004
+++ ./posix_evlsup.c	Thu Apr 22 09:39:05 2004
@@ -32,7 +32,9 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <assert.h>
+#include <stdlib.h>
 
+#include "config.h"
 
 #include "posix_evlog.h"
 #include "posix_evlsup.h"
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/query/evaluate.c ./query/evaluate.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/query/evaluate.c	Wed Mar 31 02:35:51 2004
+++ ./query/evaluate.c	Thu Apr 22 09:39:06 2004
@@ -28,6 +28,7 @@
 #include <malloc.h>
 #include <errno.h>
 #include <assert.h>
+#include <string.h>
 
 #include "posix_evlog.h"
 #include "posix_evlsup.h"
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/query/normalize.c ./query/normalize.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/query/normalize.c	Wed Mar 31 02:36:09 2004
+++ ./query/normalize.c	Thu Apr 22 10:03:38 2004
@@ -40,6 +40,9 @@
 #include "evl_parse.h"
 #include "q.tab.h"
 
+#define GETGR_R_SIZE_MAX 128
+#define GETPW_R_SIZE_MAX 128
+
 /*
  * This file contains _evlQNormalizeTree() and its helper functions.
  * _evlQNormalizeTree() takes a parse tree built by the query parser and
@@ -682,10 +685,15 @@
 		char *userName = valNode->u_att.attr_string;
 #ifdef _POSIX_THREAD_SAFE_FUNCTIONS
 		struct passwd *pw, passwd;
-		char buf[_SC_GETPW_R_SIZE_MAX];
-		(void) getpwnam_r(userName, &passwd, buf, _SC_GETPW_R_SIZE_MAX,
+		char buf[GETPW_R_SIZE_MAX];
+#ifndef __Lynx__
+		(void) getpwnam_r(userName, &passwd, buf, GETPW_R_SIZE_MAX,
 			&pw);
 #else
+    getpwnam_r(&passwd, userName, buf, GETPW_R_SIZE_MAX);
+    pw = &passwd;
+#endif
+#else
 	    	struct passwd *pw = getpwnam(userName);
 #endif
 		if (pw) {
@@ -724,10 +732,14 @@
 		char *groupName = valNode->u_att.attr_string;
 #ifdef _POSIX_THREAD_SAFE_FUNCTIONS
 		struct group *gr, group;
-		char buf[_SC_GETGR_R_SIZE_MAX];
-		(void) getgrnam_r(groupName, &group, buf, _SC_GETGR_R_SIZE_MAX,
+		char buf[GETGR_R_SIZE_MAX];
+#ifndef __Lynx__
+		(void) getgrnam_r(groupName, &group, buf, GETGR_R_SIZE_MAX,
 			&gr);
 #else
+    gr = getgrnam_r(&group, groupName, buf, GETGR_R_SIZE_MAX);  
+#endif
+#else
 	    	struct group *gr = getgrnam(groupName);
 #endif
 		if (gr) {
@@ -962,6 +974,7 @@
 	    }
 		/* NOTREACHED */
 	    	break;
+  default:
 	}
 	return 0;
 }
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/syslogat.c ./syslogat.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/syslogat.c	Wed Mar 31 02:35:51 2004
+++ ./syslogat.c	Thu Apr 22 09:39:05 2004
@@ -30,6 +30,7 @@
 #include <errno.h>
 #include <syslog.h>
 
+#include "config.h"
 #include "evlog.h"
 #include "posix_evlog.h"
 
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/convert.c ./template/convert.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/convert.c	Wed Mar 31 02:35:51 2004
+++ ./template/convert.c	Thu Apr 22 09:39:06 2004
@@ -33,10 +33,11 @@
 #include <assert.h>
 #include <limits.h>
 #include <errno.h>
-#include <wchar.h>
-#include <endian.h>
+// #include <wchar.h>
+// #include <endian.h>
 #include <byteswap.h>
 #include <wchar.h>
+#include "config.h"
 #include <evlog.h>
 
 #include "evl_util.h"
@@ -231,12 +232,13 @@
 				memcpy(data, tmp, dest_size);
 			}
 			break;
+    default:
 	}
 }
 
-/**************************************************************/
-/* Scalar 
-/**************************************************************/
+/**************************************************************
+ * Scalar 
+ **************************************************************/
 
 static void 
 __conv_scalar(int log_arch, tmpl_base_type_t type, void *data, 
@@ -283,9 +285,9 @@
 	}	
 }
 
-/**************************************************************/
-/* Array of scalar 
-/**************************************************************/
+/**************************************************************
+ * Array of scalar 
+ **************************************************************/
 static void *
 __conv_scalar_array(int log_arch, tmpl_base_type_t type, char * data,
                                         int nel, int el_size, conv_t conv_type)
@@ -306,9 +308,9 @@
 	return dest;	
 }
 
-/***************************************************************/
-/* APIs 
-/***************************************************************/
+/***************************************************************
+ * APIs 
+ ***************************************************************/
 
 void 
 _evl_conv_scalar(int arch, tmpl_base_type_t type,  void *data)
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/serial.c ./template/serial.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/serial.c	Wed Mar 31 02:35:51 2004
+++ ./template/serial.c	Thu Apr 22 09:57:41 2004
@@ -392,6 +392,7 @@
 	case TMPL_RD_ATTNAME:
 		readString(ra->u.attname, tf);
 		break;
+  default:
 	}
 	return ra;
 }
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/serialio.inc ./template/serialio.inc
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/serialio.inc	Wed Mar 31 02:35:51 2004
+++ ./template/serialio.inc	Thu Apr 22 09:39:06 2004
@@ -255,6 +255,7 @@
 		}
 		break;
 	    }
+        default:
 	}
 }
 
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/template.c ./template/template.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/template.c	Wed Mar 31 02:36:09 2004
+++ ./template/template.c	Thu Apr 22 10:04:46 2004
@@ -33,8 +33,10 @@
 #include <limits.h>
 #include <errno.h>
 #include <wchar.h>
-#include <endian.h>
+// #include <endian.h>
 
+#include "config.h"
+#include "evl_common.h"
 #include "evl_util.h"
 #include "evl_template.h"
 
@@ -754,6 +756,7 @@
 		return (long) evl_getLonglongAttVal(att);
 	case TY_ULONGLONG:
 		return (long) evl_getUlonglongAttVal(att);
+  default:
 	}
 	assert(0);
 	return 0;
@@ -1438,6 +1441,7 @@
 			ok = 1;
 		}
 		break;
+  default:
 	}
 	if (ok) {
 		att->ta_format.af_type = TMPL_AFS_CHARRSTR;
@@ -2403,6 +2407,7 @@
 				break;
 			case TMPL_DELIM_ATTR:
 				break;
+      default:
 			}
 			free(de);
 		}
@@ -2726,6 +2731,7 @@
 	case TY_LDOUBLE:
 		att->ta_value.val_longdouble = *((long double*) data);
 		break;
+  default:
 	}
 
 	notes->pn_next += size;
@@ -2956,6 +2962,7 @@
 	case TY_ULONGLONG:
 		att->ta_value.val_ulonglong = zeroExtendLL(value, bfBits);
 		break;
+  default:
 	}
 
 	att->ta_flags |= EVL_ATTR_EXISTS;
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/tmplfmt.c ./template/tmplfmt.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/tmplfmt.c	Wed Mar 31 02:35:51 2004
+++ ./template/tmplfmt.c	Thu Apr 22 09:58:19 2004
@@ -33,6 +33,7 @@
 #include <assert.h>
 #include <errno.h>
 
+#include "config.h"
 #include "evlog.h"
 #include "evl_util.h"
 #include "evl_template.h"
@@ -947,6 +948,7 @@
 			_evlFormatTmplAttribute(tmpl, fs->u2.fs_attribute,
 				fs->fs_userfmt, s);
 			break;
+    default:
 		}
 		p = p->li_next;
 	} while (p != head);
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/tmplmgmt.c ./template/tmplmgmt.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/template/tmplmgmt.c	Wed Mar 31 02:35:51 2004
+++ ./template/tmplmgmt.c	Thu Apr 22 09:39:06 2004
@@ -36,6 +36,7 @@
 #include <dirent.h>
 
 #include "config.h"
+#include "evl_common.h"
 #include "evl_template.h"
 
 /*
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/util/evl_common.c ./util/evl_common.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/util/evl_common.c	Wed Mar 31 02:35:51 2004
+++ ./util/evl_common.c	Thu Apr 22 09:39:05 2004
@@ -37,6 +37,7 @@
 #include <assert.h>
 #include <pthread.h>
 
+#include "config.h"
 #include "posix_evlog.h" 
 #include "evlog.h"
 
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/util/format.c ./util/format.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/util/format.c	Wed Mar 31 02:35:51 2004
+++ ./util/format.c	Thu Apr 22 09:39:05 2004
@@ -33,6 +33,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include "config.h"
 #include "posix_evlog.h"
 #include "posix_evlsup.h"
 #include "evlog.h"
@@ -285,6 +286,7 @@
 		seg->u.fs_attname = nsaName;
 		seg->u2.fs_attribute = NULL;
 		break;
+  default:
 	}
 	seg->fs_userfmt = attrFmt;
 	if (attrFmt
@@ -473,6 +475,7 @@
 			 */
 			size += _evlGetMaxDumpLen();
 			break;
+    default:
 		}
 		p = p->li_next;
 	} while (p != head);
@@ -664,6 +667,7 @@
 	case TY_INT:		return TY_UINT;
 	case TY_LONG:		return TY_ULONG;
 	case TY_LONGLONG:	return TY_ULONGLONG;
+  default:
 	}
 	return ty;
 }
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/util/scanner.c ./util/scanner.c
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/lib/util/scanner.c	Wed Mar 31 02:35:51 2004
+++ ./util/scanner.c	Thu Apr 22 09:39:05 2004
@@ -26,6 +26,7 @@
 
 #include <string.h>
 #include <limits.h>
+#include <ctype.h>
 
 /*
  * Auxiliary functions that can be used by scanners to tokenize C-like input.

--------------24088ED7EF95AFAAABBC2E54
Content-Type: text/plain; charset=us-ascii;
 name="include.patch"
Content-Disposition: inline;
 filename="include.patch"
Content-Transfer-Encoding: 7Bit

diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/include/evl_common.h ../include/evl_common.h
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/include/evl_common.h	Wed Mar 31 02:35:51 2004
+++ ../include/evl_common.h	Wed Apr 21 11:54:12 2004
@@ -27,6 +27,7 @@
 #ifndef _EVL_COMMON_
 #define _EVL_COMMON_
 #include <sys/un.h>
+#include <pthread.h>
 
 #ifdef __cplusplus
 extern "C" {
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/include/evl_template.h ../include/evl_template.h
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/include/evl_template.h	Wed Mar 31 02:35:51 2004
+++ ../include/evl_template.h	Thu Apr 22 09:47:11 2004
@@ -522,6 +522,8 @@
 extern tmpl_struct_ref_t *_evlTmplMakeStructRef(template_t *t,
 	const char *structPath);
 extern char *_evlMakeDotPathFromList(evl_list_t *list);
+extern void _evlTmplMakeEvlogName(posix_log_facility_t fac, int eventType,
+        char *buf, size_t size);
 
 /* tmplfmt.c */
 extern int evlatt_getstring(const evlattribute_t *att, char *buf,
@@ -546,6 +548,7 @@
 
 /* tmplgram.y */
 extern tmpl_parser_context_t *_evlTmplGetParserContext();
+void _evlTmplClearParserErrors(void);
 
 /* convert */
 void _evl_conv_scalar(int arch, tmpl_base_type_t type,  void * data);
@@ -553,6 +556,7 @@
 	int nel, int el_size);
 char * _evl_conv_wstring(int arch, char * data); 
 char * _evl_conv_wstring_array(int arch, char * data, int nel); 
+
 #ifdef __cplusplus
 }
 #endif
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/include/evlog.h ../include/evlog.h
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/include/evlog.h	Wed Mar 31 02:35:51 2004
+++ ../include/evlog.h	Wed Apr 21 19:06:52 2004
@@ -172,7 +172,11 @@
 	const char *fmt, const char *unbraced_fmt, ...);
 extern char * _evl_unbrace(const char *fmt);
 extern int evl_gen_event_type(const char *s1, const char *s2, const char *s3);
+#ifndef __Lynx__
 extern void syslog(int priority, const char *fmt, ...);
+#else
+extern void syslog(int priority, char *fmt, ...);
+#endif
 
 #define __stringify2(s) #s
 #define __stringify(s) __stringify2(s)
diff -b -aur ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/include/posix_evlsup.h ../include/posix_evlsup.h
--- ../../../../../archives/used/evlog/ref/evlog-1.6.0-b2-suse/user/include/posix_evlsup.h	Wed Mar 31 02:35:51 2004
+++ ../include/posix_evlsup.h	Wed Apr 21 11:46:21 2004
@@ -103,10 +103,13 @@
 extern int _evlFdWrite(int fd, const struct posix_log_entry *entry,
 	const void *buf);
 extern int _evlWriteLogHeader(int fd);
+extern int _evlValidateQuery(posix_log_query_t *query, int nullOk);
 
 /* facility registry functions */
-extern void _evlLockFacReg();
-extern void _evlUnlockFacReg();
+extern void _evlLockFacReg(void);
+extern void _evlUnlockFacReg(void);
+extern int _evlBlockSignals(sigset_t *oldset);
+extern void _evlRestoreSignals(sigset_t *oldset);
 extern _evlFacilityRegistry *_evlReadFacilities(const char *facRegPath);
 extern posix_log_facility_t _evlGetFacilityCodeByCIName(const char *name);
 extern char *_evlGetFacilityName(posix_log_facility_t facNum, char *buf);
@@ -122,6 +125,9 @@
 extern int isAccess(int sd);
 extern int _establishNonBlkConnection(const char * socketpath, struct sockaddr_un *sa, int nsec);
 extern int _evlWriteEx(struct posix_log_entry *hdr, const char *buf);
+extern int _evlEvaluateQuery(const posix_log_query_t *query,
+	const struct posix_log_entry *entry, const void *buf);
+
 #ifdef __cplusplus
 }
 #endif	/* __cplusplus */

--------------24088ED7EF95AFAAABBC2E54
Content-Type: text/plain; charset=us-ascii;
 name="README.txt"
Content-Disposition: inline;
 filename="README.txt"
Content-Transfer-Encoding: 7Bit

Lib changes
-----------
Some general changes:
  * config.h is included when needed by my cross-compilation
  * "default" switch case is added to remove warnings
  * evl_common.h is included to have library functions declaration (such like
    _evlMutexLock) and then remove implicit declaration warnings
  * there are some "__Lynx__" flag use. I think it shouldn't be taken (specific)

Other changes:
  * evl_log_write.c:
    - ctype.h included for isdigit declaration
  * facreg.c:
    - change the inclusion order of <stdarg.h> and <stdio.h>. Needed for my
      cross-compilation, and it is the order defined in the POSIX standard.
  * posix1.c:
    - buffers sizes definitions. It should go in a header file instead.
    - replace "sigevent_t" by "struct sigevent". sigevent_t is defined by linux,
      but not by POSIX.
  * posix2.c:
    - patches already sent
  * posix_evlsup.c:
    - <stdlib.h> included to have strtol declared.
  * query/evaluate.c:
    - <string.h> included to have strstr declared.
  * template/convert.c:
    - remove <endian.h> inclusion. But is it right? What is its use?
    - fix comment syntax errors
  * util/scanner.c:
    - <ctype.h> included to have isxdigit declared.

Include changes
---------------
  * Functions declarations added to remove implicit declaration warnings
  * __Lynx__ flag use in evlog.h. Should not be taken
  * C conformant declaration: use of func(void) instead of func()


--------------24088ED7EF95AFAAABBC2E54--



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click