Skip to content

Commit

Permalink
Make rtapi_vsnprintf.h a system header
Browse files Browse the repository at this point in the history
Renamed from `vsnprintf.h`.  This was done mainly to fix tests, but
the header could be useful in an out-of-tree comp as well.
  • Loading branch information
zultron committed Jun 10, 2020
1 parent 35a5af9 commit 96ccb4f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ HEADERS := \
rtapi/rtapi_stdint.h \
rtapi/rtapi_ctype.h \
rtapi/rtapi_errno.h \
rtapi/rtapi_string.h
rtapi/rtapi_string.h \
rtapi/rtapi_vsnprintf.h

# the "headers" target installs all the header files in ../include
.PHONY: headers
Expand Down
2 changes: 1 addition & 1 deletion src/rtapi/rtai_rtapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

#include <linux/cpumask.h> /* NR_CPUS, cpu_online() */

#include "vsnprintf.h"
#include "rtapi_vsnprintf.h"

#include <rtai.h>
#include <rtai_sched.h>
Expand Down
2 changes: 1 addition & 1 deletion src/rtapi/vsnprintf.h → src/rtapi/rtapi_vsnprintf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************
* Description: vsnprintf.h
* Description: rtapi_vsnprintf.h
* Implementation of vsnprintf for kernel space.
*
* Derived from the Linux 2.4.18 kernel (linux/lib/vsprintf.c)
Expand Down
2 changes: 1 addition & 1 deletion tests/rtapi_printf.0/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -xe

g++ -DULAPI -I${HEADERS} -std=c++11 -I../../src/rtapi \
g++ -DULAPI -I${HEADERS} -std=c++11 -I${HEADERS} \
-DSIM -rdynamic -L${LIBDIR} \
-o test_rtapi_vsnprintf test_rtapi_vsnprintf.c
./test_rtapi_vsnprintf
2 changes: 1 addition & 1 deletion tests/rtapi_printf.0/test_rtapi_vsnprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "rtapi.h"
#include "vsnprintf.h"
#include "rtapi_vsnprintf.h"
#include <stdio.h>
#include <string.h>

Expand Down

0 comments on commit 96ccb4f

Please sign in to comment.