mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-22 09:08:13 +02:00
cairo-missing: Fix and cleanup ssize_t type definition
The definition of ssize_t is needed in cairo-missing.h and can be dropped from files which include it.
This commit is contained in:
parent
60e04ff49e
commit
761ef7ae8b
4 changed files with 8 additions and 10 deletions
|
|
@ -55,8 +55,6 @@
|
|||
#ifdef _MSC_VER
|
||||
#include "dirent-win32.h"
|
||||
|
||||
typedef SSIZE_T ssize_t;
|
||||
|
||||
static char *
|
||||
basename_no_ext (char *path)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,12 +44,6 @@
|
|||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
/* 'ssize_t' does not exist in the C standard on win32.
|
||||
* We use 'ptrdiff_t', which is nearly equivalent. */
|
||||
#ifdef _MSC_VER
|
||||
typedef ptrdiff_t ssize_t;
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
static long long
|
||||
strtoll (const char *nptr,
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@
|
|||
#ifdef _MSC_VER
|
||||
#include "dirent-win32.h"
|
||||
|
||||
typedef SSIZE_T ssize_t;
|
||||
|
||||
static char *
|
||||
basename_no_ext (char *path)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,6 +35,14 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
typedef SSIZE_T ssize_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETLINE
|
||||
cairo_private ssize_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue