Skip to content

Commit

Permalink
Remove local implementation of strtok_r
Browse files Browse the repository at this point in the history
MS Visual Studio does not provide that function, but can use strtok_s
which does exactly the same.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Jun 5, 2017
1 parent 22bcf4d commit 5f8ecdb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 92 deletions.
4 changes: 1 addition & 3 deletions ccutil/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,5 @@ libtesseract_ccutil_la_SOURCES = \
params.cpp universalambigs.cpp

if T_WIN
AM_CPPFLAGS += -I$(top_srcdir)/vs2010/port -DWINDLLNAME=\"lib@GENERIC_LIBRARY_NAME@\"
noinst_HEADERS += ../vs2010/port/strtok_r.h
libtesseract_ccutil_la_SOURCES += ../vs2010/port/strtok_r.cpp
AM_CPPFLAGS += -DWINDLLNAME=\"lib@GENERIC_LIBRARY_NAME@\"
endif
10 changes: 3 additions & 7 deletions ccutil/ambigs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@
#include "helpers.h"
#include "universalambigs.h"

#if defined _WIN32
#ifndef __GNUC__
#define strtok_r strtok_s
#else
#include "strtok_r.h"
#endif /* __GNUC__ */
#endif /* _WIN32 */
#if defined(_WIN32) && !defined(__GNUC__)
# define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
#endif /* _WIN32 && !__GNUC__ */

namespace tesseract {

Expand Down
55 changes: 0 additions & 55 deletions vs2010/port/strtok_r.cpp

This file was deleted.

27 changes: 0 additions & 27 deletions vs2010/port/strtok_r.h

This file was deleted.

0 comments on commit 5f8ecdb

Please sign in to comment.