Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/replace/replace.h

    r860 r988  
    4242#include <errno.h>
    4343
     44#ifndef HAVE_DECL_EWOULDBLOCK
     45#define EWOULDBLOCK EAGAIN
     46#endif
     47
    4448#if defined(_MSC_VER) || defined(__MINGW32__)
    4549#include "win32_replace.h"
     
    4751
    4852
    49 #ifdef HAVE_STDINT_H
     53#ifdef HAVE_INTTYPES_H
     54#define __STDC_FORMAT_MACROS
     55#include <inttypes.h>
     56#elif HAVE_STDINT_H
    5057#include <stdint.h>
    5158/* force off HAVE_INTTYPES_H so that roken doesn't try to include both,
    5259   which causes a warning storm on irix */
    5360#undef HAVE_INTTYPES_H
    54 #elif HAVE_INTTYPES_H
    55 #define __STDC_FORMAT_MACROS
    56 #include <inttypes.h>
     61#endif
     62
     63#ifdef HAVE_MALLOC_H
     64#include <malloc.h>
    5765#endif
    5866
    5967#ifndef __PRI64_PREFIX
    60 # if __WORDSIZE == 64
     68# if __WORDSIZE == 64 && ! defined __APPLE__
    6169#  define __PRI64_PREFIX        "l"
    6270# else
     
    105113#endif
    106114
     115#ifndef SCNd8
     116# define SCNd8          "hhd"
     117#endif
     118#ifndef SCNd16
     119# define SCNd16         "hd"
     120#endif
     121#ifndef SCNd32
     122# define SCNd32         "d"
     123#endif
     124#ifndef SCNd64
     125# define SCNd64         __PRI64_PREFIX "d"
     126#endif
     127
     128#ifndef SCNi8
     129# define SCNi8          "hhi"
     130#endif
     131#ifndef SCNi16
     132# define SCNi16         "hi"
     133#endif
     134#ifndef SCNi32
     135# define SCNi32         "i"
     136#endif
     137#ifndef SCNi64
     138# define SCNi64         __PRI64_PREFIX "i"
     139#endif
     140
     141#ifndef SCNu8
     142# define SCNu8          "hhu"
     143#endif
     144#ifndef SCNu16
     145# define SCNu16         "hu"
     146#endif
     147#ifndef SCNu32
     148# define SCNu32         "u"
     149#endif
     150#ifndef SCNu64
     151# define SCNu64         __PRI64_PREFIX "u"
     152#endif
     153
     154#ifdef HAVE_BSD_STRING_H
     155#include <bsd/string.h>
     156#endif
     157
     158#ifdef HAVE_BSD_UNISTD_H
     159#include <bsd/unistd.h>
     160#endif
     161
    107162#ifdef HAVE_STRING_H
    108163#include <string.h>
     
    115170#ifdef HAVE_SYS_TYPES_H
    116171#include <sys/types.h>
     172#endif
     173
     174#ifdef HAVE_SETPROCTITLE_H
     175#include <setproctitle.h>
    117176#endif
    118177
     
    154213#endif
    155214
     215#ifndef HAVE_MEMALIGN
     216#define memalign rep_memalign
     217void *rep_memalign(size_t boundary, size_t size);
     218#endif
     219
    156220#ifndef HAVE_MKTIME
    157221#define mktime rep_mktime
     
    284348#define strcasestr rep_strcasestr
    285349char *rep_strcasestr(const char *haystack, const char *needle);
     350#endif
     351
     352#ifndef HAVE_STRSEP
     353#define strsep rep_strsep
     354char *rep_strsep(char **pps, const char *delim);
    286355#endif
    287356
     
    453522#endif
    454523
    455 #ifdef REPLACE_STRPTIME
     524#ifndef HAVE_WORKING_STRPTIME
    456525#define strptime rep_strptime
    457526struct tm;
     
    550619#endif
    551620
    552 #if !defined(HAVE_STRERROR_R) || !defined(STRERROR_R_PROTO_COMPATIBLE)
    553 #undef strerror_r
     621#ifndef HAVE_STRERROR_R
    554622#define strerror_r rep_strerror_r
    555623int rep_strerror_r(int errnum, char *buf, size_t buflen);
     
    586654#ifndef UINT64_MAX
    587655#define UINT64_MAX ((uint64_t)-1)
     656#endif
     657
     658#ifndef INT64_MAX
     659#define INT64_MAX 9223372036854775807LL
    588660#endif
    589661
     
    821893#endif
    822894
    823 #if !defined(getpass)
    824 #ifdef REPLACE_GETPASS
    825 #if defined(REPLACE_GETPASS_BY_GETPASSPHRASE)
    826 #define getpass(prompt) getpassphrase(prompt)
    827 #else
    828 #define getpass(prompt) rep_getpass(prompt)
    829 char *rep_getpass(const char *prompt);
    830 #endif
    831 #endif
     895#ifndef HAVE_GETPEEREID
     896#define getpeereid rep_getpeereid
     897int rep_getpeereid(int s, uid_t *uid, gid_t *gid);
     898#endif
     899
     900#ifndef HAVE_USLEEP
     901#define usleep rep_usleep
     902typedef long useconds_t;
     903int usleep(useconds_t);
     904#endif
     905
     906#ifndef HAVE_SETPROCTITLE
     907#define setproctitle rep_setproctitle
     908void rep_setproctitle(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2);
     909#endif
     910
     911bool nss_wrapper_enabled(void);
     912bool nss_wrapper_hosts_enabled(void);
     913bool socket_wrapper_enabled(void);
     914bool uid_wrapper_enabled(void);
     915
     916/* Needed for Solaris atomic_add_XX functions. */
     917#if defined(HAVE_SYS_ATOMIC_H)
     918#include <sys/atomic.h>
    832919#endif
    833920
Note: See TracChangeset for help on using the changeset viewer.