m4 errprint: add __program__ info

This commit is contained in:
cgzones 2017-03-08 17:16:27 +01:00
parent 4d028498d8
commit d3462090d5
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ define(`__endline__',`
#
# print a warning message
#
define(`refpolicywarn',`errprint(__file__:__line__: Warning: `$1'__endline__) ifdef(`m4_werror',`define(`m4_fatal_error')')')
define(`refpolicywarn',`errprint(__program__:__file__:__line__: Warning: `$1'__endline__) ifdef(`m4_werror',`define(`m4_fatal_error')')')
########################################
#
@ -42,7 +42,7 @@ define(`refpolicywarn',`errprint(__file__:__line__: Warning: `$1'__endline__) if
#
# print an error message.
#
define(`refpolicyerr',`errprint(__file__:__line__: Error: `$1'__endline__) define(`m4_fatal_error')')
define(`refpolicyerr',`errprint(__program__:__file__:__line__: Error: `$1'__endline__) define(`m4_fatal_error')')
########################################
#

View File

@ -1,4 +1,4 @@
ifdef(`m4_fatal_error',`
ifdef(`m4_werror',`errprint(__file__: Notice: Treating warnings as errors.__endline__)')
ifdef(`m4_werror',`errprint(__program__:__file__: Notice: Treating warnings as errors.__endline__)')
m4exit(`1')
')