Skip to content

Commit 80ebfd7

Browse files
committed
Regards #14 : Standard library function aliasing redone so as not to leave their names as macros outside the library - that's not such a great idea.
1 parent ae105ac commit 80ebfd7

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

printf.h

+15-6
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ __attribute__((format(__printf__, (one_based_format_index), (first_arg))))
5757
#endif
5858

5959
#ifdef PRINTF_ALIAS_STANDARD_FUNCTION_NAMES
60-
# define printf printf_
61-
# define sprintf sprintf_
62-
# define vsprintf vsprintf_
63-
# define snprintf snprintf_
64-
# define vsnprintf vsnprintf_
65-
# define vprintf vprintf_
60+
# define printf_ printf_
61+
# define sprintf_ sprintf_
62+
# define vsprintf_ vsprintf_
63+
# define snprintf_ snprintf_
64+
# define vsnprintf_ vsnprintf_
65+
# define vprintf_ vprintf_
6666
#endif
6767

6868

@@ -136,4 +136,13 @@ int vfctprintf(void (*out)(char character, void* arg), void* arg, const char* fo
136136
}
137137
#endif
138138

139+
#ifdef PRINTF_ALIAS_STANDARD_FUNCTION_NAMES
140+
# undef printf_
141+
# undef sprintf_
142+
# undef vsprintf_
143+
# undef snprintf_
144+
# undef vsnprintf_
145+
# undef vprintf_
146+
#endif
147+
139148
#endif // _PRINTF_H_

0 commit comments

Comments
 (0)