Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2009 22:35:05 +0000 (UTC)
From:      Fabien Thomas <fabient@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r190395 - head/lib/libpmc
Message-ID:  <200903242235.n2OMZ5a3058648@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fabient
Date: Tue Mar 24 22:35:05 2009
New Revision: 190395
URL: http://svn.freebsd.org/changeset/base/190395

Log:
  Allow compile from c++ for libpmc
  
  Approved by:	jkoshy (mentor)
  MFC after:	3 days

Modified:
  head/lib/libpmc/pmc.h
  head/lib/libpmc/pmclog.h

Modified: head/lib/libpmc/pmc.h
==============================================================================
--- head/lib/libpmc/pmc.h	Tue Mar 24 21:02:19 2009	(r190394)
+++ head/lib/libpmc/pmc.h	Tue Mar 24 22:35:05 2009	(r190395)
@@ -29,6 +29,7 @@
 #ifndef _PMC_H_
 #define _PMC_H_
 
+#include <sys/cdefs.h>
 #include <sys/pmc.h>
 
 /*
@@ -68,6 +69,7 @@ struct pmc_pmcinfo {
  * Prototypes
  */
 
+__BEGIN_DECLS
 int	pmc_allocate(const char *_ctrspec, enum pmc_mode _mode, uint32_t _flags,
     int _cpu, pmc_id_t *_pmcid);
 int	pmc_attach(pmc_id_t _pmcid, pid_t _pid);
@@ -105,5 +107,6 @@ const char	*pmc_name_of_state(enum pmc_s
 
 int	pmc_event_names_of_class(enum pmc_class _cl, const char ***_eventnames,
     int *_nevents);
+__END_DECLS
 
 #endif

Modified: head/lib/libpmc/pmclog.h
==============================================================================
--- head/lib/libpmc/pmclog.h	Tue Mar 24 21:02:19 2009	(r190394)
+++ head/lib/libpmc/pmclog.h	Tue Mar 24 22:35:05 2009	(r190395)
@@ -33,6 +33,7 @@
 #ifndef	_PMCLOG_H_
 #define	_PMCLOG_H_
 
+#include <sys/cdefs.h>
 #include <sys/pmclog.h>
 
 enum pmclog_state {
@@ -158,10 +159,12 @@ struct pmclog_ev {
 
 #define	PMCLOG_FD_NONE				(-1)
 
+__BEGIN_DECLS
 void	*pmclog_open(int _fd);
 int	pmclog_feed(void *_cookie, char *_data, int _len);
 int	pmclog_read(void *_cookie, struct pmclog_ev *_ev);
 void	pmclog_close(void *_cookie);
+__END_DECLS
 
 #endif
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903242235.n2OMZ5a3058648>