• Rosen Penev's avatar
    replace stddef.h with cstddef · 2db8bcc3
    Rosen Penev authored
    The former is deprecated with C++14. The standard says both are the same:
    
    The contents and meaning of the header<cstddef>are the same as the C
    standard library header<stddef.h>,except that it does not declare the type
    wchar_t, that it also declares the type byte and its associated
    operations (21.2.5), and as noted in 21.2.3 and 21.2.4.
    Signed-off-by: 's avatarRosen Penev <rosenp@gmail.com>
    2db8bcc3
Limits.hxx 1.15 KB
/*
 * Copyright 2003-2020 The Music Player Daemon Project
 * http://www.musicpd.org
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef MPD_FS_LIMITS_HXX
#define MPD_FS_LIMITS_HXX

#include <climits>
#include <cstddef>

#if defined(_WIN32)
static constexpr size_t MPD_PATH_MAX = 260;
#elif defined(MAXPATHLEN)
static constexpr size_t MPD_PATH_MAX = MAXPATHLEN;
#elif defined(PATH_MAX)
static constexpr size_t MPD_PATH_MAX = PATH_MAX;
#else
static constexpr size_t MPD_PATH_MAX = 256;
#endif

#endif