Re: mjpeg_logging.h conflicts with syslog.h

"Steven M. Schultz" <[email protected]>
Newsgroups gmane.comp.video.mjpeg.devel
Message-ID <[email protected]>
On Sun, 1 Apr 2007, Bernhard Praschinger wrote:

> I found in the tracker one problem with the mjpegtools:
> [ mjpeg-Bugs-1683109 ] mjpeg_logging.h conflicts with syslog.h
> https://sourceforge.net/tracker/?func=detail&atid=105776&aid=1683109&group_id=5776
> 
> With the short code in he posted I was able to reproduce the problem.
> 
> One solution would be to change the
> log_level_t to:
> MJPEG_LOG_NONE = 0,
> MJPEG_LOG_DEBUG,
> MJPEG_LOG_INFO,
> MJPEG_LOG_WARN,
> MJPEG_LOG_ERROR

> If we change it compiling works. But we also have to change all programs 
> using th LOG_* in the code. I found that it is used in 21 other files. 
> And we would have to change that source code to.
> 
> Does somebody have a better idea ?
	
	Yes, I think I have a better idea.

	We could include <syslog.h> and use LOG_INFO, LOG_DEBUG, ... 

	Something like this in mjpeg_logging.h

#ifdef	HAVE_SYSLOG_H
#include <syslog.h>
#endif
	
	We don't care what the value of the LOG_* symbols is so using the 
	system's values will be OK.

	Cheers,
	Steven Schultz


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.