missing: move char{16,32}_t definitions to missing_type.h

This commit is contained in:
Yu Watanabe 2018-12-04 08:08:15 +01:00
parent 8ca2702f00
commit 38e0c63d72
5 changed files with 16 additions and 11 deletions

View File

@ -8,7 +8,7 @@
#include <uchar.h>
#include "string-util.h"
#include "missing.h"
#include "missing_type.h"
/* What characters are special in the shell? */
/* must be escaped outside and inside double-quotes */

View File

@ -108,6 +108,7 @@ basic_sources = files('''
missing_securebits.h
missing_stat.h
missing_syscall.h
missing_type.h
missing_vxcan.h
mkdir-label.c
mkdir.c

View File

@ -14,7 +14,6 @@
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/syscall.h>
#include <uchar.h>
#include <unistd.h>
#if HAVE_AUDIT
@ -278,14 +277,6 @@ struct sockaddr_vm {
#define KCMP_FILE 0
#endif
#if !HAVE_CHAR32_T
#define char32_t uint32_t
#endif
#if !HAVE_CHAR16_T
#define char16_t uint16_t
#endif
#ifndef ETHERTYPE_LLDP
#define ETHERTYPE_LLDP 0x88cc
#endif
@ -331,5 +322,6 @@ struct sockaddr_vm {
#include "missing_magic.h"
#include "missing_network.h"
#include "missing_prctl.h"
#include "missing_type.h"
#include "missing_syscall.h"

12
src/basic/missing_type.h Normal file
View File

@ -0,0 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include <uchar.h>
#if !HAVE_CHAR32_T
#define char32_t uint32_t
#endif
#if !HAVE_CHAR16_T
#define char16_t uint16_t
#endif

View File

@ -7,7 +7,7 @@
#include <uchar.h>
#include "macro.h"
#include "missing.h"
#include "missing_type.h"
#define UTF8_REPLACEMENT_CHARACTER "\xef\xbf\xbd"
#define UTF8_BYTE_ORDER_MARK "\xef\xbb\xbf"