Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/csync
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2020-07-16 15:21:38 +0300
committerKevin Ottens <kevin.ottens@nextcloud.com>2020-12-15 12:59:15 +0300
commit458977239375b086ae9b0743955ab8ef4219f472 (patch)
treec82fb2edcc6d2f93cbc1794aa1b3db5d7433d2ae /src/csync
parent3dcbc9fa66b081bf301fd94c7da4f09b66823b65 (diff)
Remove more legacy C code
Diffstat (limited to 'src/csync')
-rw-r--r--src/csync/CMakeLists.txt2
-rw-r--r--src/csync/ConfigureChecks.cmake13
-rw-r--r--src/csync/config_csync.h.cmake3
-rw-r--r--src/csync/std/asprintf.c90
-rw-r--r--src/csync/std/asprintf.h68
-rw-r--r--src/csync/std/c_alloc.c89
-rw-r--r--src/csync/std/c_alloc.h125
-rw-r--r--src/csync/std/c_lib.h3
-rw-r--r--src/csync/std/c_macro.h111
-rw-r--r--src/csync/std/c_private.h8
-rw-r--r--src/csync/std/c_string.c65
-rw-r--r--src/csync/std/c_string.h75
-rw-r--r--src/csync/std/c_time.cpp2
-rw-r--r--src/csync/vio/csync_vio_local_unix.cpp1
14 files changed, 0 insertions, 655 deletions
diff --git a/src/csync/CMakeLists.txt b/src/csync/CMakeLists.txt
index cbb8f73d6..0fa5f3320 100644
--- a/src/csync/CMakeLists.txt
+++ b/src/csync/CMakeLists.txt
@@ -34,8 +34,6 @@ set(csync_SRCS
csync_exclude.cpp
csync_util.cpp
- std/c_alloc.c
- std/c_string.c
std/c_time.cpp
)
diff --git a/src/csync/ConfigureChecks.cmake b/src/csync/ConfigureChecks.cmake
index d6a028ce8..022ff14c2 100644
--- a/src/csync/ConfigureChecks.cmake
+++ b/src/csync/ConfigureChecks.cmake
@@ -25,25 +25,12 @@ if (NOT LINUX)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
endif (NOT LINUX)
-check_function_exists(asprintf HAVE_ASPRINTF)
-
if(WIN32)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} psapi kernel32)
endif()
check_function_exists(timegm HAVE_TIMEGM)
-check_function_exists(strerror_r HAVE_STRERROR_R)
check_function_exists(utimes HAVE_UTIMES)
check_function_exists(lstat HAVE_LSTAT)
-check_function_exists(asprintf HAVE_ASPRINTF)
-if (WIN32)
- check_function_exists(__mingw_asprintf HAVE___MINGW_ASPRINTF)
-endif(WIN32)
-if (UNIX AND HAVE_ASPRINTF)
- add_definitions(-D_GNU_SOURCE)
-endif (UNIX AND HAVE_ASPRINTF)
-if (WIN32)
- check_function_exists(__mingw_asprintf HAVE___MINGW_ASPRINTF)
-endif(WIN32)
set(CSYNC_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "csync required system libraries")
diff --git a/src/csync/config_csync.h.cmake b/src/csync/config_csync.h.cmake
index aff1bb744..855ecd33e 100644
--- a/src/csync/config_csync.h.cmake
+++ b/src/csync/config_csync.h.cmake
@@ -9,10 +9,7 @@
#cmakedefine HAVE_ARGP_H 1
#cmakedefine HAVE_TIMEGM 1
-#cmakedefine HAVE_STRERROR_R 1
#cmakedefine HAVE_UTIMES 1
#cmakedefine HAVE_LSTAT 1
-#cmakedefine HAVE___MINGW_ASPRINTF 1
-#cmakedefine HAVE_ASPRINTF 1
diff --git a/src/csync/std/asprintf.c b/src/csync/std/asprintf.c
deleted file mode 100644
index 8738df973..000000000
--- a/src/csync/std/asprintf.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- https://raw.githubusercontent.com/littlstar/asprintf.c/20ce5207a4ecb24017b5a17e6cd7d006e3047146/asprintf.c
-
- The MIT License (MIT)
-
- Copyright (c) 2014 Little Star Media, Inc.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-*/
-
-/**
- * `asprintf.c' - asprintf
- *
- * copyright (c) 2014 joseph werle <joseph.werle@gmail.com>
- */
-
-#ifndef HAVE_ASPRINTF
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "asprintf.h"
-
-int
-asprintf (char **str, const char *fmt, ...) {
- int size = 0;
- va_list args;
-
- // init variadic argumens
- va_start(args, fmt);
-
- // format and get size
- size = vasprintf(str, fmt, args);
-
- // toss args
- va_end(args);
-
- return size;
-}
-
-int
-vasprintf (char **str, const char *fmt, va_list args) {
- int size = 0;
- va_list tmpa;
-
- // copy
- va_copy(tmpa, args);
-
- // apply variadic arguments to
- // sprintf with format to get size
- size = vsnprintf(NULL, size, fmt, tmpa);
-
- // toss args
- va_end(tmpa);
-
- // return -1 to be compliant if
- // size is less than 0
- if (size < 0) { return -1; }
-
- // alloc with size plus 1 for `\0'
- *str = (char *) malloc(size + 1);
-
- // return -1 to be compliant
- // if pointer is `NULL'
- if (NULL == *str) { return -1; }
-
- // format string with original
- // variadic arguments and set new size
- size = vsprintf(*str, fmt, args);
- return size;
-}
-
-#endif
diff --git a/src/csync/std/asprintf.h b/src/csync/std/asprintf.h
deleted file mode 100644
index 21693ca89..000000000
--- a/src/csync/std/asprintf.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- https://raw.githubusercontent.com/littlstar/asprintf.c/20ce5207a4ecb24017b5a17e6cd7d006e3047146/asprintf.h
-
- The MIT License (MIT)
-
- Copyright (c) 2014 Little Star Media, Inc.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-*/
-
-/**
- * `asprintf.h' - asprintf.c
- *
- * copyright (c) 2014 joseph werle <joseph.werle@gmail.com>
- */
-
-#ifndef HAVE_ASPRINTF
-#ifndef ASPRINTF_H
-#define ASPRINTF_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdarg.h>
-
-/**
- * Sets `char **' pointer to be a buffer
- * large enough to hold the formatted string
- * accepting a `va_list' args of variadic
- * arguments.
- */
-
-int
-vasprintf (char **, const char *, va_list);
-
-/**
- * Sets `char **' pointer to be a buffer
- * large enough to hold the formatted
- * string accepting `n' arguments of
- * variadic arguments.
- */
-
-int
-asprintf (char **, const char *, ...);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-#endif
diff --git a/src/csync/std/c_alloc.c b/src/csync/std/c_alloc.c
deleted file mode 100644
index ab2f2a47a..000000000
--- a/src/csync/std/c_alloc.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * cynapses libc functions
- *
- * Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <string.h>
-
-#include "c_macro.h"
-#include "c_alloc.h"
-
-void *c_calloc(size_t count, size_t size) {
- if (size == 0 || count == 0) {
- return NULL;
- }
-
-#ifdef CSYNC_MEM_NULL_TESTS
- if (getenv("CSYNC_NOMEMORY")) {
- return NULL;
- }
-#endif /* CSYNC_MEM_NULL_TESTS */
-
-#undef calloc
- return calloc(count, size);
-#define calloc(x,y) DO_NOT_CALL_CALLOC__USE_XCALLOC_INSTEAD
-}
-
-void *c_malloc(size_t size) {
- if (size == 0) {
- return NULL;
- }
-#undef malloc
- return c_calloc(1, size);
-#define malloc(x) DO_NOT_CALL_MALLOC__USE_XMALLOC_INSTEAD
-}
-
-void *c_realloc(void *ptr, size_t size) {
-
-#ifdef CSYNC_MEM_NULL_TESTS
- if (getenv("CSYNC_NOMEMORY")) {
- return NULL;
- }
-#endif /* CSYNC_MEM_NULL_TESTS */
-
-#undef realloc
- return realloc(ptr, size);
-#define realloc(x,y) DO_NOT_CALL_REALLOC__USE_XREALLOC_INSTEAD
-}
-
-char *c_strdup(const char *str) {
- char *ret = NULL;
- ret = (char *) c_malloc(strlen(str) + 1);
- if (ret == NULL) {
- return NULL;
- }
- strcpy(ret, str);
- return ret;
-}
-
-char *c_strndup(const char *str, size_t size) {
- char *ret = NULL;
- size_t len = 0;
- len = strlen(str);
- if (len > size) {
- len = size;
- }
- ret = (char *) c_malloc(len + 1);
- if (ret == NULL) {
- return NULL;
- }
- strncpy(ret, str, len);
- ret[size] = '\0';
- return ret;
-}
-
diff --git a/src/csync/std/c_alloc.h b/src/csync/std/c_alloc.h
deleted file mode 100644
index 166c5c8cd..000000000
--- a/src/csync/std/c_alloc.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * cynapses libc functions
- *
- * Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file c_alloc.h
- *
- * @brief Interface of the cynapses libc alloc function
- *
- * @defgroup cynLibraryAPI cynapses libc API (internal)
- *
- * @defgroup cynAllocInternals cynapses libc alloc functions
- * @ingroup cynLibraryAPI
- *
- * @{
- */
-
-#ifndef _C_ALLOC_H
-#define _C_ALLOC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdlib.h> // NOLINT this is sometimes compiled in C mode
-
-#include "c_macro.h"
-
-/**
- * @brief Allocates memory for an array.
- *
- * Allocates memory for an array of <count> elements of <size> bytes each and
- * returns a pointer to the allocated memory. The memory is set to zero.
- *
- * @param count Amount of elements to allocate
- * @param size Size in bytes of each element to allocate.
- *
- * @return A unique pointer value that can later be successfully passed to
- * free(). If size or count is 0, NULL will be returned.
- */
-void *c_calloc(size_t count, size_t size);
-
-/**
- * @brief Allocates memory for an array.
- *
- * Allocates <size> bytes of memory. The memory is set to zero.
- *
- * @param size Size in bytes to allocate.
- *
- * @return A unique pointer value that can later be successfully passed to
- * free(). If size or count is 0, NULL will be returned.
- */
-void *c_malloc(size_t size);
-
-/**
- * @brief Changes the size of the memory block pointed to.
- *
- * Newly allocated memory will be uninitialized.
- *
- * @param ptr Pointer to the memory which should be resized.
- * @param size Value to resize.
- *
- * @return If ptr is NULL, the call is equivalent to c_malloc(size); if size
- * is equal to zero, the call is equivalent to free(ptr). Unless ptr
- * is NULL, it must have been returned by an earlier call to
- * c_malloc(), c_calloc() or c_realloc(). If the area pointed to was
- * moved, a free(ptr) is done.
- */
-void *c_realloc(void *ptr, size_t size);
-
-/**
- * @brief Duplicate a string.
- *
- * The function returns a pointer to a newly allocated string which is a
- * duplicate of the string str.
- *
- * @param str String to duplicate.
- *
- * @return Returns a pointer to the duplicated string, or NULL if insufficient
- * memory was available.
- *
- */
-char *c_strdup(const char *str);
-
-/**
- * @brief Duplicate a string.
- *
- * The function returns a pointer to a newly allocated string which is a
- * duplicate of the string str of size bytes.
- *
- * @param str String to duplicate.
- *
- * @param size Size of the string to duplicate.
- *
- * @return Returns a pointer to the duplicated string, or NULL if insufficient
- * memory was available. A terminating null byte '\0' is added.
- *
- */
-char *c_strndup(const char *str, size_t size);
-
-/**
- * }@
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _C_ALLOC_H */
diff --git a/src/csync/std/c_lib.h b/src/csync/std/c_lib.h
index f6092a953..13b9f1587 100644
--- a/src/csync/std/c_lib.h
+++ b/src/csync/std/c_lib.h
@@ -21,7 +21,4 @@
#include <stdlib.h> // NOLINT this is sometimes compiled in C mode
#include <string.h> // NOLINT this is sometimes compiled in C mode
-#include "c_macro.h"
-#include "c_alloc.h"
-#include "c_string.h"
#include "c_private.h"
diff --git a/src/csync/std/c_macro.h b/src/csync/std/c_macro.h
deleted file mode 100644
index 6e9cafb08..000000000
--- a/src/csync/std/c_macro.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * cynapses libc functions
- *
- * Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file c_macro.h
- *
- * @brief cynapses libc macro definitions
- *
- * @defgroup cynMacroInternals cynapses libc macro definitions
- * @ingroup cynLibraryAPI
- *
- * @{
- */
-#ifndef _C_MACRO_H
-#define _C_MACRO_H
-
-#include <stdint.h> // NOLINT this is sometimes compiled in C mode
-#include <string.h> // NOLINT this is sometimes compiled in C mode
-
-#define INT_TO_POINTER(i) (void *) i
-#define POINTER_TO_INT(p) *((int *) (p))
-
-/** Zero a structure */
-#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
-
-/** Zero a structure given a pointer to the structure */
-#define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0)
-
-/** Free memory and zero the pointer */
-#define SAFE_FREE(x) do { if ((x) != NULL) {free((void*)(x)); (x)=NULL;} } while(0)
-
-/** Get the smaller value */
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-
-/** Get the bigger value */
-#define MAX(a,b) ((a) < (b) ? (b) : (a))
-
-/** Get the size of an array */
-#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
-
-/**
- * This is a hack to fix warnings. The idea is to use this everywhere that we
- * get the "discarding const" warning by the compiler. That doesn't actually
- * fix the real issue, but marks the place and you can search the code for
- * discard_const.
- *
- * Please use this macro only when there is no other way to fix the warning.
- * We should use this function in only in a very few places.
- *
- * Also, please call this via the discard_const_p() macro interface, as that
- * makes the return type safe.
- */
-#define discard_const(ptr) ((void *)((uintptr_t)(ptr)))
-
-/**
- * Type-safe version of discard_const
- */
-#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
-
-#if (__GNUC__ >= 3)
-# ifndef likely
-# define likely(x) __builtin_expect(!!(x), 1)
-# endif
-# ifndef unlikely
-# define unlikely(x) __builtin_expect(!!(x), 0)
-# endif
-#else /* __GNUC__ */
-# ifndef likely
-# define likely(x) (x)
-# endif
-# ifndef unlikely
-# define unlikely(x) (x)
-# endif
-#endif /* __GNUC__ */
-
-/**
- * }@
- */
-
-#ifdef _WIN32
-/* missing errno codes on mingw */
-#ifndef ENOTBLK
-#define ENOTBLK 15
-#endif
-#ifndef ETXTBSY
-#define ETXTBSY 26
-#endif
-#ifndef ENOBUFS
-#define ENOBUFS WSAENOBUFS
-#endif
-#endif /* _WIN32 */
-
-#endif /* _C_MACRO_H */
-
diff --git a/src/csync/std/c_private.h b/src/csync/std/c_private.h
index 9b1ee2502..bfad3b1b9 100644
--- a/src/csync/std/c_private.h
+++ b/src/csync/std/c_private.h
@@ -84,14 +84,6 @@ typedef struct stat csync_stat_t; // NOLINT this is sometimes compiled in C mode
#define O_NOATIME 0
#endif
-#if !defined(HAVE_ASPRINTF)
-#if defined(HAVE___MINGW_ASPRINTF)
-#define asprintf __mingw_asprintf
-#else
-#include "asprintf.h"
-#endif
-#endif
-
#ifndef HAVE_LSTAT
#define lstat _stat
#endif
diff --git a/src/csync/std/c_string.c b/src/csync/std/c_string.c
deleted file mode 100644
index 553b97cb9..000000000
--- a/src/csync/std/c_string.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * cynapses libc functions
- *
- * Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
- * Copyright (c) 2012-2013 by Klaas Freitag <freitag@owncloud.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config_csync.h"
-
-#include <assert.h>
-#include <errno.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <limits.h>
-#include <sys/types.h>
-#include <wchar.h>
-
-#include "c_string.h"
-#include "c_alloc.h"
-#include "c_macro.h"
-
-#ifdef _WIN32
-#include <windows.h>
-#endif
-
-int c_strncasecmp(const char *a, const char *b, size_t n) {
-#ifdef _WIN32
- return _strnicmp(a, b, n);
-#else
- return strncasecmp(a, b, n);
-#endif
-}
-
-int c_streq(const char *a, const char *b) {
- register const char *s1 = a;
- register const char *s2 = b;
-
- if (s1 == NULL || s2 == NULL) {
- return 0;
- }
-
- while (*s1 == *s2++) {
- if (*s1++ == '\0') {
- return 1;
- }
- }
-
- return 0;
-}
diff --git a/src/csync/std/c_string.h b/src/csync/std/c_string.h
deleted file mode 100644
index 9c8b557d4..000000000
--- a/src/csync/std/c_string.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * cynapses libc functions
- *
- * Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
- * Copyright (c) 2012-2013 by Klaas Freitag <freitag@owncloud.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file c_string.h
- *
- * @brief Interface of the cynapses string implementations
- *
- * @defgroup cynStringInternals cynapses libc string functions
- * @ingroup cynLibraryAPI
- *
- * @{
- */
-#ifndef _C_STR_H
-#define _C_STR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "c_private.h"
-#include "c_macro.h"
-
-#include <stdlib.h> // NOLINT this is sometimes compiled in C mode
-
-/**
- * @brief Compare to strings case insensitively.
- *
- * @param a First string to compare.
- * @param b Second string to compare.
- * @param n Max comparison length.
- *
- * @return see strncasecmp
- */
-int c_strncasecmp(const char *a, const char *b, size_t n);
-
-/**
- * @brief Compare to strings if they are equal.
- *
- * @param a First string to compare.
- * @param b Second string to compare.
- *
- * @return 1 if they are equal, 0 if not.
- */
-int c_streq(const char *a, const char *b);
-
-
-/**
- * }@
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _C_STR_H */
-
diff --git a/src/csync/std/c_time.cpp b/src/csync/std/c_time.cpp
index 616255313..846f5b7d2 100644
--- a/src/csync/std/c_time.cpp
+++ b/src/csync/std/c_time.cpp
@@ -20,8 +20,6 @@
#include "config_csync.h"
#include "c_private.h"
-#include "c_string.h"
-
#include "c_time.h"
#include <QFile>
diff --git a/src/csync/vio/csync_vio_local_unix.cpp b/src/csync/vio/csync_vio_local_unix.cpp
index fae033b9d..9f035422b 100644
--- a/src/csync/vio/csync_vio_local_unix.cpp
+++ b/src/csync/vio/csync_vio_local_unix.cpp
@@ -30,7 +30,6 @@
#include "c_private.h"
#include "c_lib.h"
-#include "c_string.h"
#include "csync_util.h"
#include "vio/csync_vio_local.h"