From a983b06d37c3b87a02444d9a9862777b88629344 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Sep 2006 04:44:32 +0000 Subject: r18129: moved the system includes into libreplace - this gives much more isolation of our portability environment from the main code, and also simplifies the includes system (no separate #ifdef _SAMBA_BUILD for tdb. ldb etc now) (This used to be commit 77d1a468e06290aba789e2f3affc769fc5159a21) --- source4/lib/replace/system/README | 4 + source4/lib/replace/system/capability.h | 41 ++++++++ source4/lib/replace/system/config.m4 | 31 ++++++ source4/lib/replace/system/dir.h | 64 ++++++++++++ source4/lib/replace/system/filesys.h | 170 ++++++++++++++++++++++++++++++++ source4/lib/replace/system/glob.h | 33 +++++++ source4/lib/replace/system/iconv.h | 40 ++++++++ source4/lib/replace/system/kerberos.h | 133 +++++++++++++++++++++++++ source4/lib/replace/system/locale.h | 34 +++++++ source4/lib/replace/system/network.h | 103 +++++++++++++++++++ source4/lib/replace/system/passwd.h | 96 ++++++++++++++++++ source4/lib/replace/system/printing.h | 46 +++++++++ source4/lib/replace/system/readline.h | 48 +++++++++ source4/lib/replace/system/select.h | 42 ++++++++ source4/lib/replace/system/shmem.h | 51 ++++++++++ source4/lib/replace/system/syslog.h | 66 +++++++++++++ source4/lib/replace/system/terminal.h | 42 ++++++++ source4/lib/replace/system/time.h | 40 ++++++++ source4/lib/replace/system/wait.h | 37 +++++++ 19 files changed, 1121 insertions(+) create mode 100644 source4/lib/replace/system/README create mode 100644 source4/lib/replace/system/capability.h create mode 100644 source4/lib/replace/system/config.m4 create mode 100644 source4/lib/replace/system/dir.h create mode 100644 source4/lib/replace/system/filesys.h create mode 100644 source4/lib/replace/system/glob.h create mode 100644 source4/lib/replace/system/iconv.h create mode 100644 source4/lib/replace/system/kerberos.h create mode 100644 source4/lib/replace/system/locale.h create mode 100644 source4/lib/replace/system/network.h create mode 100644 source4/lib/replace/system/passwd.h create mode 100644 source4/lib/replace/system/printing.h create mode 100644 source4/lib/replace/system/readline.h create mode 100644 source4/lib/replace/system/select.h create mode 100644 source4/lib/replace/system/shmem.h create mode 100644 source4/lib/replace/system/syslog.h create mode 100644 source4/lib/replace/system/terminal.h create mode 100644 source4/lib/replace/system/time.h create mode 100644 source4/lib/replace/system/wait.h (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/README b/source4/lib/replace/system/README new file mode 100644 index 0000000000..69a2b80b56 --- /dev/null +++ b/source4/lib/replace/system/README @@ -0,0 +1,4 @@ +This directory contains wrappers around logical groups of system +include files. The idea is to avoid #ifdef blocks in the main code, +and instead put all the necessary conditional includes in subsystem +specific header files in this directory. diff --git a/source4/lib/replace/system/capability.h b/source4/lib/replace/system/capability.h new file mode 100644 index 0000000000..6ed8ae8de0 --- /dev/null +++ b/source4/lib/replace/system/capability.h @@ -0,0 +1,41 @@ +#ifndef _system_capability_h +#define _system_capability_h +/* + Unix SMB/CIFS implementation. + + capability system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_SYS_CAPABILITY_H + +#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H) +#define _I386_STATFS_H +#define BROKEN_REDHAT_7_STATFS_WORKAROUND +#endif + +#include + +#ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND +#undef _I386_STATFS_H +#undef BROKEN_REDHAT_7_STATFS_WORKAROUND +#endif + +#endif + +#endif diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4 new file mode 100644 index 0000000000..4d66317a5e --- /dev/null +++ b/source4/lib/replace/system/config.m4 @@ -0,0 +1,31 @@ +# filesys +AC_HEADER_DIRENT +AC_CHECK_HEADERS(fcntl.h sys/fcntl.h sys/acl.h sys/resource.h sys/ioctl.h sys/mode.h sys/filio.h sys/fs/s5param.h sys/filsys.h ) + +# select +AC_CHECK_HEADERS(sys/select.h) + +# time +AC_CHECK_HEADERS(sys/time.h utime.h) +AC_HEADER_TIME + +# wait +AC_HEADER_SYS_WAIT + +# capability +AC_CHECK_HEADERS(sys/capability.h) + +# passwd +AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h) + +# locale +AC_CHECK_HEADERS(ctype.h locale.h) + +# glob +AC_CHECK_HEADERS(fnmatch.h) + +# shmem +AC_CHECK_HEADERS(sys/ipc.h sys/mman.h sys/shm.h ) + +# terminal +AC_CHECK_HEADERS(termios.h termio.h sys/termio.h ) diff --git a/source4/lib/replace/system/dir.h b/source4/lib/replace/system/dir.h new file mode 100644 index 0000000000..64e413c907 --- /dev/null +++ b/source4/lib/replace/system/dir.h @@ -0,0 +1,64 @@ +#ifndef _system_dir_h +#define _system_dir_h +/* + Unix SMB/CIFS implementation. + + directory system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#if HAVE_DIRENT_H +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# endif +#endif + +#ifndef HAVE_MKDIR_MODE +#define mkdir(dir, mode) mkdir(dir) +#endif + +/* Test whether a file name is the "." or ".." directory entries. + * These really should be inline functions. + */ +#ifndef ISDOT +#define ISDOT(path) ( \ + *((const char *)(path)) == '.' && \ + *(((const char *)(path)) + 1) == '\0' \ + ) +#endif + +#ifndef ISDOTDOT +#define ISDOTDOT(path) ( \ + *((const char *)(path)) == '.' && \ + *(((const char *)(path)) + 1) == '.' && \ + *(((const char *)(path)) + 2) == '\0' \ + ) +#endif + +#endif diff --git a/source4/lib/replace/system/filesys.h b/source4/lib/replace/system/filesys.h new file mode 100644 index 0000000000..1e48f7ab40 --- /dev/null +++ b/source4/lib/replace/system/filesys.h @@ -0,0 +1,170 @@ +#ifndef _system_filesys_h +#define _system_filesys_h +/* + Unix SMB/CIFS implementation. + + filesystem system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include +#include + +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +#ifdef HAVE_SYS_MOUNT_H +#include +#endif + +#ifdef HAVE_SYS_VFS_H +#include +#endif + +#ifdef HAVE_SYS_ACL_H +#include +#endif + +#ifdef HAVE_SYS_FS_S5PARAM_H +#include +#endif + +#if defined (HAVE_SYS_FILSYS_H) && !defined (_CRAY) +#include +#endif + +#ifdef HAVE_SYS_STATFS_H +# include +#endif + +#ifdef HAVE_DUSTAT_H +#include +#endif + +#ifdef HAVE_SYS_STATVFS_H +#include +#endif + +#ifdef HAVE_SYS_FILIO_H +#include +#endif + +#include + +#ifdef HAVE_FCNTL_H +#include +#else +#ifdef HAVE_SYS_FCNTL_H +#include +#endif +#endif + +#ifdef HAVE_SYS_MODE_H +/* apparently AIX needs this for S_ISLNK */ +#ifndef S_ISLNK +#include +#endif +#endif + +#ifdef HAVE_SYS_IOCTL_H +#include +#endif + +/* + * Veritas File System. Often in addition to native. + * Quotas different. + */ +#if defined(HAVE_SYS_FS_VX_QUOTA_H) +#define VXFS_QUOTA +#endif + +#if HAVE_SYS_ATTRIBUTES_H +#include +#endif + +/* mutually exclusive (SuSE 8.2) */ +#if HAVE_ATTR_XATTR_H +#include +#elif HAVE_SYS_XATTR_H +#include +#endif + + +#ifdef HAVE_SYS_RESOURCE_H +#include +#endif + +/* Some POSIX definitions for those without */ + +#ifndef S_IFDIR +#define S_IFDIR 0x4000 +#endif +#ifndef S_ISDIR +#define S_ISDIR(mode) ((mode & 0xF000) == S_IFDIR) +#endif +#ifndef S_IRWXU +#define S_IRWXU 00700 /* read, write, execute: owner */ +#endif +#ifndef S_IRUSR +#define S_IRUSR 00400 /* read permission: owner */ +#endif +#ifndef S_IWUSR +#define S_IWUSR 00200 /* write permission: owner */ +#endif +#ifndef S_IXUSR +#define S_IXUSR 00100 /* execute permission: owner */ +#endif +#ifndef S_IRWXG +#define S_IRWXG 00070 /* read, write, execute: group */ +#endif +#ifndef S_IRGRP +#define S_IRGRP 00040 /* read permission: group */ +#endif +#ifndef S_IWGRP +#define S_IWGRP 00020 /* write permission: group */ +#endif +#ifndef S_IXGRP +#define S_IXGRP 00010 /* execute permission: group */ +#endif +#ifndef S_IRWXO +#define S_IRWXO 00007 /* read, write, execute: other */ +#endif +#ifndef S_IROTH +#define S_IROTH 00004 /* read permission: other */ +#endif +#ifndef S_IWOTH +#define S_IWOTH 00002 /* write permission: other */ +#endif +#ifndef S_IXOTH +#define S_IXOTH 00001 /* execute permission: other */ +#endif + +#ifndef O_ACCMODE +#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) +#endif + +#ifndef MAXPATHLEN +#define MAXPATHLEN 256 +#endif + +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif + +#endif diff --git a/source4/lib/replace/system/glob.h b/source4/lib/replace/system/glob.h new file mode 100644 index 0000000000..0e51f397c6 --- /dev/null +++ b/source4/lib/replace/system/glob.h @@ -0,0 +1,33 @@ +#ifndef _system_glob_h +#define _system_glob_h +/* + Unix SMB/CIFS implementation. + + glob system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_GLOB_H +#include +#endif + +#ifdef HAVE_FNMATCH_H +#include +#endif + +#endif diff --git a/source4/lib/replace/system/iconv.h b/source4/lib/replace/system/iconv.h new file mode 100644 index 0000000000..75ee1d83ba --- /dev/null +++ b/source4/lib/replace/system/iconv.h @@ -0,0 +1,40 @@ +#ifndef _system_iconv_h +#define _system_iconv_h +/* + Unix SMB/CIFS implementation. + + iconv memory system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_NATIVE_ICONV +#ifdef HAVE_ICONV_H +#include +#endif +#ifdef HAVE_GICONV_H +#include +#endif +#endif + +/* needed for some systems without iconv. Doesn't really matter + what error code we use */ +#ifndef EILSEQ +#define EILSEQ EIO +#endif + +#endif diff --git a/source4/lib/replace/system/kerberos.h b/source4/lib/replace/system/kerberos.h new file mode 100644 index 0000000000..b24196fc25 --- /dev/null +++ b/source4/lib/replace/system/kerberos.h @@ -0,0 +1,133 @@ +#ifndef _system_kerberos_h +#define _system_kerberos_h + +/* + Unix SMB/CIFS implementation. + + kerberos system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_KRB5 +/* Whether the krb5_address struct has a addrtype property */ +/* #undef HAVE_ADDRTYPE_IN_KRB5_ADDRESS */ +/* Whether the krb5_address struct has a addr_type property */ +#define HAVE_ADDR_TYPE_IN_KRB5_ADDRESS 1 +/* Define to 1 if you have the `gsskrb5_extract_authz_data_from_sec_context' */ +#define HAVE_GSSKRB5_EXTRACT_AUTHZ_DATA_FROM_SEC_CONTEXT 1 +/* Define to 1 if you have the `gsskrb5_get_initiator_subkey' function. */ +#define HAVE_GSSKRB5_GET_INITIATOR_SUBKEY 1 +/* Define to 1 if you have the `gsskrb5_register_acceptor_identity' function. */ +#define HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY 1 +/* Define to 1 if you have the `gss_krb5_ccache_name' function. */ +#define HAVE_GSS_KRB5_CCACHE_NAME 1 +/* Define to 1 if you have the `krb5_addlog_func' function. */ +#define HAVE_KRB5_ADDLOG_FUNC 1 +/* Define to 1 if you have the `krb5_auth_con_setkey' function. */ +#define HAVE_KRB5_AUTH_CON_SETKEY 1 +/* Define to 1 if you have the `krb5_auth_con_setuseruserkey' function. */ +/* #undef HAVE_KRB5_AUTH_CON_SETUSERUSERKEY */ +/* Define to 1 if you have the `krb5_c_enctype_compare' function. */ +#define HAVE_KRB5_C_ENCTYPE_COMPARE 1 +/* Define to 1 if you have the `krb5_c_verify_checksum' function. */ +#define HAVE_KRB5_C_VERIFY_CHECKSUM 1 +/* Whether the type krb5_encrypt_block exists */ +/* #undef HAVE_KRB5_ENCRYPT_BLOCK */ +/* Define to 1 if you have the `krb5_encrypt_data' function. */ +/* #undef HAVE_KRB5_ENCRYPT_DATA */ +/* Define to 1 if you have the `krb5_enctypes_compatible_keys' function. */ +#define HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS 1 +/* Define to 1 if you have the `krb5_free_data_contents' function. */ +#define HAVE_KRB5_FREE_DATA_CONTENTS 1 +/* Define to 1 if you have the `krb5_free_error_string' function. */ +#define HAVE_KRB5_FREE_ERROR_STRING 1 +/* Define to 1 if you have the `krb5_free_keytab_entry_contents' function. */ +/* #undef HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS */ +/* Define to 1 if you have the `krb5_free_ktypes' function. */ +/* #undef HAVE_KRB5_FREE_KTYPES */ +/* Define to 1 if you have the `krb5_free_unparsed_name' function. */ +/* #undef HAVE_KRB5_FREE_UNPARSED_NAME */ +/* Define to 1 if you have the `krb5_get_default_in_tkt_etypes' function. */ +#define HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES 1 +/* Define to 1 if you have the `krb5_get_error_string' function. */ +#define HAVE_KRB5_GET_ERROR_STRING 1 +/* Define to 1 if you have the `krb5_get_permitted_enctypes' function. */ +/* #undef HAVE_KRB5_GET_PERMITTED_ENCTYPES */ +/* Define to 1 if you have the `krb5_get_pw_salt' function. */ +#define HAVE_KRB5_GET_PW_SALT 1 +/* Define to 1 if you have the header file. */ +#define HAVE_KRB5_H 1 +/* Define to 1 if you have the `krb5_initlog' function. */ +#define HAVE_KRB5_INITLOG 1 +/* Define to 1 if you have the `krb5_kdc_default_config' function. */ +#define HAVE_KRB5_KDC_DEFAULT_CONFIG 1 +/* Whether the krb5_creds struct has a keyblock property */ +/* #undef HAVE_KRB5_KEYBLOCK_IN_CREDS */ +/* Whether the krb5_keyblock struct has a keyvalue property */ +#define HAVE_KRB5_KEYBLOCK_KEYVALUE 1 +/* Whether krb5_keytab_entry has key member */ +/* #undef HAVE_KRB5_KEYTAB_ENTRY_KEY */ +/* Whether krb5_keytab_entry has keyblock member */ +#define HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK 1 +/* Define to 1 if you have the `krb5_krbhst_get_addrinfo' function. */ +#define HAVE_KRB5_KRBHST_GET_ADDRINFO 1 +/* Define to 1 if you have the `krb5_kt_compare' function. */ +#define HAVE_KRB5_KT_COMPARE 1 +/* Define to 1 if you have the `krb5_kt_free_entry' function. */ +#define HAVE_KRB5_KT_FREE_ENTRY 1 +/* Whether the type krb5_log_facility exists */ +#define HAVE_KRB5_LOG_FACILITY 1 +/* Define to 1 if you have the `krb5_mk_req_extended' function. */ +#define HAVE_KRB5_MK_REQ_EXTENDED 1 +/* Define to 1 if you have the `krb5_principal2salt' function. */ +/* #undef HAVE_KRB5_PRINCIPAL2SALT */ +/* Define to 1 if you have the `krb5_principal_get_comp_string' function. */ +#define HAVE_KRB5_PRINCIPAL_GET_COMP_STRING 1 +/* Whether krb5_princ_component is available */ +/* #undef HAVE_KRB5_PRINC_COMPONENT */ +/* Whether the krb5_creds struct has a session property */ +#define HAVE_KRB5_SESSION_IN_CREDS 1 +/* Define to 1 if you have the `krb5_set_default_in_tkt_etypes' function. */ +#define HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES 1 +/* Define to 1 if you have the `krb5_set_default_tgs_ktypes' function. */ +/* #undef HAVE_KRB5_SET_DEFAULT_TGS_KTYPES */ +/* Define to 1 if you have the `krb5_set_real_time' function. */ +#define HAVE_KRB5_SET_REAL_TIME 1 +/* Define to 1 if you have the `krb5_set_warn_dest' function. */ +#define HAVE_KRB5_SET_WARN_DEST 1 +/* Define to 1 if you have the `krb5_string_to_key' function. */ +#define HAVE_KRB5_STRING_TO_KEY 1 +/* Define to 1 if you have the `krb5_string_to_key_salt' function. */ +#define HAVE_KRB5_STRING_TO_KEY_SALT 1 +/* Define to 1 if you have the `krb5_ticket_get_authorization_data_type' */ +#define HAVE_KRB5_TICKET_GET_AUTHORIZATION_DATA_TYPE 1 +/* Whether the krb5_ticket struct has a enc_part2 property */ +/* #undef HAVE_KRB5_TKT_ENC_PART2 */ +/* Define to 1 if you have the `krb5_use_enctype' function. */ +/* #undef HAVE_KRB5_USE_ENCTYPE */ +/* Define to 1 if you have the `krb5_verify_checksum' function. */ +#define HAVE_KRB5_VERIFY_CHECKSUM 1 +/* Whether krb5_princ_realm returns krb5_realm or krb5_data */ +#define KRB5_PRINC_REALM_RETURNS_REALM 1 + +#include "heimdal/lib/krb5/krb5.h" +#include "heimdal/lib/gssapi/gssapi.h" +#include "heimdal/lib/com_err/com_err.h" +#endif + +#endif diff --git a/source4/lib/replace/system/locale.h b/source4/lib/replace/system/locale.h new file mode 100644 index 0000000000..82b179dc5b --- /dev/null +++ b/source4/lib/replace/system/locale.h @@ -0,0 +1,34 @@ +#ifndef _system_locale_h +#define _system_locale_h + +/* + Unix SMB/CIFS implementation. + + locale include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_CTYPE_H +#include +#endif + +#ifdef HAVE_LOCALE_H +#include +#endif + +#endif diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h new file mode 100644 index 0000000000..9b73466924 --- /dev/null +++ b/source4/lib/replace/system/network.h @@ -0,0 +1,103 @@ +#ifndef _system_network_h +#define _system_network_h +/* + Unix SMB/CIFS implementation. + + networking system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +#ifdef HAVE_UNIXSOCKET +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif + +#ifdef HAVE_NETDB_H +#include +#endif + +#ifdef HAVE_NETINET_TCP_H +#include +#endif + +/* + * The next three defines are needed to access the IPTOS_* options + * on some systems. + */ + +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif + +#ifdef HAVE_NETINET_IN_IP_H +#include +#endif + +#ifdef HAVE_NETINET_IP_H +#include +#endif + +#ifdef HAVE_NET_IF_H +#include +#endif + +#ifdef SOCKET_WRAPPER +#define SOCKET_WRAPPER_REPLACE +#include "lib/socket_wrapper/socket_wrapper.h" +#endif + +#ifdef REPLACE_INET_NTOA +char *rep_inet_ntoa(struct in_addr ip); +#define inet_ntoa rep_inet_ntoa +#endif + +/* + * glibc on linux doesn't seem to have MSG_WAITALL + * defined. I think the kernel has it though.. + */ +#ifndef MSG_WAITALL +#define MSG_WAITALL 0 +#endif + +/* + * Some older systems seem not to have MAXHOSTNAMELEN + * defined. + */ +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 254 +#endif + +#ifndef INADDR_LOOPBACK +#define INADDR_LOOPBACK 0x7f000001 +#endif + +#ifndef INADDR_NONE +#define INADDR_NONE 0xffffffff +#endif + +#endif diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h new file mode 100644 index 0000000000..6f8d729a7c --- /dev/null +++ b/source4/lib/replace/system/passwd.h @@ -0,0 +1,96 @@ +#ifndef _system_passwd_h +#define _system_passwd_h + +/* + Unix SMB/CIFS implementation. + + passwd system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_PWD_H +#include +#endif +#ifdef HAVE_GRP_H +#include +#endif +#ifdef HAVE_SYS_PRIV_H +#include +#endif +#ifdef HAVE_SYS_ID_H +#include +#endif + +#ifdef HAVE_CRYPT_H +#include +#endif + +#ifdef HAVE_SHADOW_H +#include +#endif + +#ifdef HAVE_SYS_SECURITY_H +#include +#include +#define PASSWORD_LENGTH 16 +#endif /* HAVE_SYS_SECURITY_H */ + +#ifdef HAVE_GETPWANAM +#include +#include +#include +#endif + +#ifdef HAVE_COMPAT_H +#include +#endif + +#ifdef REPLACE_GETPASS +#define getpass(prompt) getsmbpass((prompt)) +#endif + +#ifndef NGROUPS_MAX +#define NGROUPS_MAX 32 /* Guess... */ +#endif + +/* what is the longest significant password available on your system? + Knowing this speeds up password searches a lot */ +#ifndef PASSWORD_LENGTH +#define PASSWORD_LENGTH 8 +#endif + +#if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS) +#define OSF1_ENH_SEC 1 +#endif + +#ifndef ALLOW_CHANGE_PASSWORD +#if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID)) +#define ALLOW_CHANGE_PASSWORD 1 +#endif +#endif + +#if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID) +#define ULTRIX_AUTH 1 +#endif + + +#ifndef HAVE_INITGROUPS +int initgroups(char *name,gid_t id); +#endif + +#endif diff --git a/source4/lib/replace/system/printing.h b/source4/lib/replace/system/printing.h new file mode 100644 index 0000000000..489ccb1da8 --- /dev/null +++ b/source4/lib/replace/system/printing.h @@ -0,0 +1,46 @@ +#ifndef _system_printing_h +#define _system_printing_h + +/* + Unix SMB/CIFS implementation. + + printing system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef AIX +#define DEFAULT_PRINTING PRINT_AIX +#define PRINTCAP_NAME "/etc/qconfig" +#endif + +#ifdef HPUX +#define DEFAULT_PRINTING PRINT_HPUX +#endif + +#ifdef QNX +#define DEFAULT_PRINTING PRINT_QNX +#endif + +#ifndef DEFAULT_PRINTING +#define DEFAULT_PRINTING PRINT_BSD +#endif +#ifndef PRINTCAP_NAME +#define PRINTCAP_NAME "/etc/printcap" +#endif + +#endif diff --git a/source4/lib/replace/system/readline.h b/source4/lib/replace/system/readline.h new file mode 100644 index 0000000000..4a64ef1376 --- /dev/null +++ b/source4/lib/replace/system/readline.h @@ -0,0 +1,48 @@ +#ifndef _system_readline_h +#define _system_readline_h +/* + Unix SMB/CIFS implementation. + + readline wrappers + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_LIBREADLINE +# ifdef HAVE_READLINE_READLINE_H +# include +# ifdef HAVE_READLINE_HISTORY_H +# include +# endif +# else +# ifdef HAVE_READLINE_H +# include +# ifdef HAVE_HISTORY_H +# include +# endif +# else +# undef HAVE_LIBREADLINE +# endif +# endif +#endif + +#ifdef HAVE_NEW_LIBREADLINE +# define RL_COMPLETION_CAST (rl_completion_func_t *) +#else +/* This type is missing from libreadline<4.0 (approximately) */ +# define RL_COMPLETION_CAST +#endif /* HAVE_NEW_LIBREADLINE */ + +#endif diff --git a/source4/lib/replace/system/select.h b/source4/lib/replace/system/select.h new file mode 100644 index 0000000000..0d1eabbc35 --- /dev/null +++ b/source4/lib/replace/system/select.h @@ -0,0 +1,42 @@ +#ifndef _system_select_h +#define _system_select_h +/* + Unix SMB/CIFS implementation. + + select system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_SYS_SELECT_H +#include +#endif + +#ifndef SELECT_CAST +#define SELECT_CAST +#endif + +/* use epoll if it is available */ +#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_SYS_EPOLL_H) +#define WITH_EPOLL 1 +#endif + +#if WITH_EPOLL +#include +#endif + +#endif diff --git a/source4/lib/replace/system/shmem.h b/source4/lib/replace/system/shmem.h new file mode 100644 index 0000000000..9c0458363a --- /dev/null +++ b/source4/lib/replace/system/shmem.h @@ -0,0 +1,51 @@ +#ifndef _system_shmem_h +#define _system_shmem_h +/* + Unix SMB/CIFS implementation. + + shared memory system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#if defined(HAVE_SYS_IPC_H) +#include +#endif /* HAVE_SYS_IPC_H */ + +#if defined(HAVE_SYS_SHM_H) +#include +#endif /* HAVE_SYS_SHM_H */ + +#ifdef HAVE_SYS_MMAN_H +#include +#endif + +/* NetBSD doesn't have these */ +#ifndef SHM_R +#define SHM_R 0400 +#endif + +#ifndef SHM_W +#define SHM_W 0200 +#endif + + +#ifndef MAP_FILE +#define MAP_FILE 0 +#endif + +#endif diff --git a/source4/lib/replace/system/syslog.h b/source4/lib/replace/system/syslog.h new file mode 100644 index 0000000000..e123830a70 --- /dev/null +++ b/source4/lib/replace/system/syslog.h @@ -0,0 +1,66 @@ +#ifndef _system_syslog_h +#define _system_syslog_h +/* + Unix SMB/CIFS implementation. + + syslog system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_SYSLOG_H +#include +#else +#ifdef HAVE_SYS_SYSLOG_H +#include +#endif +#endif + +/* For sys_adminlog(). */ +#ifndef LOG_EMERG +#define LOG_EMERG 0 /* system is unusable */ +#endif + +#ifndef LOG_ALERT +#define LOG_ALERT 1 /* action must be taken immediately */ +#endif + +#ifndef LOG_CRIT +#define LOG_CRIT 2 /* critical conditions */ +#endif + +#ifndef LOG_ERR +#define LOG_ERR 3 /* error conditions */ +#endif + +#ifndef LOG_WARNING +#define LOG_WARNING 4 /* warning conditions */ +#endif + +#ifndef LOG_NOTICE +#define LOG_NOTICE 5 /* normal but significant condition */ +#endif + +#ifndef LOG_INFO +#define LOG_INFO 6 /* informational */ +#endif + +#ifndef LOG_DEBUG +#define LOG_DEBUG 7 /* debug-level messages */ +#endif + +#endif diff --git a/source4/lib/replace/system/terminal.h b/source4/lib/replace/system/terminal.h new file mode 100644 index 0000000000..94d6b5cc98 --- /dev/null +++ b/source4/lib/replace/system/terminal.h @@ -0,0 +1,42 @@ +#ifndef _system_terminal_h +#define _system_terminal_h +/* + Unix SMB/CIFS implementation. + + terminal system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef SUNOS4 +/* on SUNOS4 termios.h conflicts with sys/ioctl.h */ +#undef HAVE_TERMIOS_H +#endif + + +#if defined(HAVE_TERMIOS_H) +/* POSIX terminal handling. */ +#include +#elif defined(HAVE_TERMIO_H) +/* Older SYSV terminal handling - don't use if we can avoid it. */ +#include +#elif defined(HAVE_SYS_TERMIO_H) +/* Older SYSV terminal handling - don't use if we can avoid it. */ +#include +#endif + +#endif diff --git a/source4/lib/replace/system/time.h b/source4/lib/replace/system/time.h new file mode 100644 index 0000000000..e7c88f133d --- /dev/null +++ b/source4/lib/replace/system/time.h @@ -0,0 +1,40 @@ +#ifndef _system_time_h +#define _system_time_h +/* + Unix SMB/CIFS implementation. + + time system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef TIME_WITH_SYS_TIME +#include +#include +#else +#ifdef HAVE_SYS_TIME_H +#include +#else +#include +#endif +#endif + +#ifdef HAVE_UTIME_H +#include +#endif + +#endif diff --git a/source4/lib/replace/system/wait.h b/source4/lib/replace/system/wait.h new file mode 100644 index 0000000000..be8c203f73 --- /dev/null +++ b/source4/lib/replace/system/wait.h @@ -0,0 +1,37 @@ +#ifndef _system_wait_h +#define _system_wait_h +/* + Unix SMB/CIFS implementation. + + waitpid system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_SYS_WAIT_H +#include +#endif + +#ifndef SIGCLD +#define SIGCLD SIGCHLD +#endif + +#ifndef SIGNAL_CAST +#define SIGNAL_CAST (RETSIGTYPE (*)(int)) +#endif + +#endif -- cgit From fed41fd9b19b5fe84bc7cabd07fef23299fbb4c6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Sep 2006 08:43:33 +0000 Subject: r18146: we need signal.h in some places (This used to be commit f226645d73c85011fea32a9b6e26eb41dd2c4336) --- source4/lib/replace/system/wait.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/wait.h b/source4/lib/replace/system/wait.h index be8c203f73..c2041a5938 100644 --- a/source4/lib/replace/system/wait.h +++ b/source4/lib/replace/system/wait.h @@ -26,6 +26,8 @@ #include #endif +#include + #ifndef SIGCLD #define SIGCLD SIGCHLD #endif -- cgit From 3ca73facc59ed8a97abbc28c1b4bedde87e109a6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Sep 2006 11:31:59 +0000 Subject: r18160: - pread and pwrite replacements need to be non-static - replacing rename() is pointless - all platforms have it (and the #define of rename breaks some code) - use system/locale.h in snprintf.c - fix passwd.h for initgroups - stdlib is in replace.h, not needed elsewhere - fix the initgroups replacement - fix mapping of dl functions to rep_* (This used to be commit 57cd0ca176387d6a3acabf9fedeef4f2a3a3dad7) --- source4/lib/replace/system/passwd.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 6f8d729a7c..21f31f0388 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/lib/replace/system/passwd.h @@ -88,9 +88,4 @@ #define ULTRIX_AUTH 1 #endif - -#ifndef HAVE_INITGROUPS -int initgroups(char *name,gid_t id); -#endif - #endif -- cgit From 513568b7e2da1fe3ba26fb02228d616b453112ea Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 11 Sep 2006 21:25:06 +0000 Subject: r18400: move MAP_FAILED define to lib/replace/system/shmem.h (This used to be commit 025b142ff268498cfb36fc0e7e9e25a2c5963d38) --- source4/lib/replace/system/shmem.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/shmem.h b/source4/lib/replace/system/shmem.h index 9c0458363a..26fa7c8d43 100644 --- a/source4/lib/replace/system/shmem.h +++ b/source4/lib/replace/system/shmem.h @@ -48,4 +48,8 @@ #define MAP_FILE 0 #endif +#ifndef MAP_FAILED +#define MAP_FAILED ((void *)-1) +#endif + #endif -- cgit From 4a854fe809ba617336db3e1d277e00c7ef95c55f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 17 Sep 2006 05:11:57 +0000 Subject: r18593: try to get the same socket_wrapper file building in samba3 and samba4 this is preparation of adding libreplace to samba3 later. metze (This used to be commit 26228e4b2e8debd84caebe84bb34bfbbf2ad405c) --- source4/lib/replace/system/network.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 9b73466924..615fcab5c8 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -67,7 +67,9 @@ #endif #ifdef SOCKET_WRAPPER +#ifndef SOCKET_WRAPPER_NOT_REPLACE #define SOCKET_WRAPPER_REPLACE +#endif #include "lib/socket_wrapper/socket_wrapper.h" #endif -- cgit From 174742a74ce448d1944ada9dd602aadf20bce6f8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 27 Sep 2006 10:13:45 +0000 Subject: r18947: overload listen() and ioctl() in socket_wrapper metze (This used to be commit dfaccdca1b6954cd61828749d7b000f804f3b066) --- source4/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 615fcab5c8..a21f8e2eaf 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -66,6 +66,10 @@ #include #endif +#ifdef HAVE_SYS_IOCTL_H +#include +#endif + #ifdef SOCKET_WRAPPER #ifndef SOCKET_WRAPPER_NOT_REPLACE #define SOCKET_WRAPPER_REPLACE -- cgit From c0c135c774fccc9a1ac6b6a40817ff4207df9478 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 27 Sep 2006 14:16:32 +0000 Subject: r18957: we need to include unistd.h in system/network.h because it contains the ioctl() prototype on some systems and we need to make sure it gets included before socket_wrapper defines ioctl swrap_ioctl metze (This used to be commit f37b13cbe65404f27d31b8020afb2f542313f4d3) --- source4/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index a21f8e2eaf..5e648dcd15 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -66,6 +66,10 @@ #include #endif +#ifdef HAVE_UNISTD_H +#include +#endif + #ifdef HAVE_SYS_IOCTL_H #include #endif -- cgit From 2210d51e4e6f554d5c97e1a918db7353b2c74606 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 6 Oct 2006 11:01:05 +0000 Subject: r19122: merge from samba3: sync system/iconv.h metze (This used to be commit 9c74964b619fd0754d3b72c21fe2cef4d24e7ad5) --- source4/lib/replace/system/iconv.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/iconv.h b/source4/lib/replace/system/iconv.h index 75ee1d83ba..abc2d6f4e1 100644 --- a/source4/lib/replace/system/iconv.h +++ b/source4/lib/replace/system/iconv.h @@ -22,14 +22,27 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#if !defined(HAVE_ICONV) && defined(HAVE_ICONV_H) +#define HAVE_ICONV +#endif + +#if !defined(HAVE_GICONV) && defined(HAVE_GICONV_H) +#define HAVE_GICONV +#endif + +#if !defined(HAVE_BICONV) && defined(HAVE_BICONV_H) +#define HAVE_BICONV +#endif + #ifdef HAVE_NATIVE_ICONV -#ifdef HAVE_ICONV_H +#if defined(HAVE_ICONV) #include -#endif -#ifdef HAVE_GICONV_H +#elif defined(HAVE_GICONV) #include +#elif defined(HAVE_BICONV) +#include #endif -#endif +#endif /* HAVE_NATIVE_ICONV */ /* needed for some systems without iconv. Doesn't really matter what error code we use */ -- cgit From 5a4b133d1ce7ec5043a092396072be5374b3cf24 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 21 Oct 2006 09:15:15 +0000 Subject: r19438: try to fix up the build breakages on BSD systems due to incorrectly detecting iconv.h (This used to be commit e6baa13e1f9c35f95021512b713cebba680b2a72) --- source4/lib/replace/system/iconv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/iconv.h b/source4/lib/replace/system/iconv.h index abc2d6f4e1..f01d135dd1 100644 --- a/source4/lib/replace/system/iconv.h +++ b/source4/lib/replace/system/iconv.h @@ -35,11 +35,11 @@ #endif #ifdef HAVE_NATIVE_ICONV -#if defined(HAVE_ICONV) +#if defined(HAVE_ICONV_H) #include -#elif defined(HAVE_GICONV) +#elif defined(HAVE_GICONV_H) #include -#elif defined(HAVE_BICONV) +#elif defined(HAVE_BICONV_H) #include #endif #endif /* HAVE_NATIVE_ICONV */ -- cgit From 2e468ee5df6371799d627f78245417fd61c5741d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 21 Oct 2006 10:12:39 +0000 Subject: r19442: this real cause of the failures on *BSD came from the missing ICONV dependency and not from a broken configure test and incorrect ifdef's. metze (This used to be commit 3df2cb1ea82dae7395d3d19ba73f97dad26bb86b) --- source4/lib/replace/system/iconv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/iconv.h b/source4/lib/replace/system/iconv.h index f01d135dd1..abc2d6f4e1 100644 --- a/source4/lib/replace/system/iconv.h +++ b/source4/lib/replace/system/iconv.h @@ -35,11 +35,11 @@ #endif #ifdef HAVE_NATIVE_ICONV -#if defined(HAVE_ICONV_H) +#if defined(HAVE_ICONV) #include -#elif defined(HAVE_GICONV_H) +#elif defined(HAVE_GICONV) #include -#elif defined(HAVE_BICONV_H) +#elif defined(HAVE_BICONV) #include #endif #endif /* HAVE_NATIVE_ICONV */ -- cgit From 13dbee3ffea6065a826f010e50c9b4eb2c6ad109 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 7 Nov 2006 00:48:36 +0000 Subject: r19598: Ahead of a merge to current lorikeet-heimdal: Break up auth/auth.h not to include the world. Add credentials_krb5.h with the kerberos dependent prototypes. Andrew Bartlett (This used to be commit 2b569c42e0fbb596ea82484d0e1cb22e193037b9) --- source4/lib/replace/system/kerberos.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/kerberos.h b/source4/lib/replace/system/kerberos.h index b24196fc25..1617b96aad 100644 --- a/source4/lib/replace/system/kerberos.h +++ b/source4/lib/replace/system/kerberos.h @@ -126,7 +126,6 @@ #define KRB5_PRINC_REALM_RETURNS_REALM 1 #include "heimdal/lib/krb5/krb5.h" -#include "heimdal/lib/gssapi/gssapi.h" #include "heimdal/lib/com_err/com_err.h" #endif -- cgit From 4a1ac217f4499f154e01c1f6e8aceb9ac6adeae7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 10 Jan 2007 18:23:06 +0000 Subject: r20659: add missing system/aio.h tridge: please commit your version and merge it to both samba3 branches metze (This used to be commit ba492e2c3a64dfc5d4743ba568c63cb9a59e2849) --- source4/lib/replace/system/aio.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 source4/lib/replace/system/aio.h (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/aio.h b/source4/lib/replace/system/aio.h new file mode 100644 index 0000000000..102ed5ceb1 --- /dev/null +++ b/source4/lib/replace/system/aio.h @@ -0,0 +1,29 @@ +#ifndef _system_aio_h +#define _system_aoi_h +/* + Unix SMB/CIFS implementation. + + async io include wrappers + + Copyright (C) Stefan Metzmacher 2006 + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_LIBAIO_H 1 +#include +#endif + +#endif -- cgit From 4056528f7268daee5b8fdec0e9b9b6fb19fb72e8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 10 Jan 2007 20:07:13 +0000 Subject: r20665: put in my version of aio.h sorry about that .... (This used to be commit a91373291422e2f50b91fd7c2317dce5d2a4ab63) --- source4/lib/replace/system/aio.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/aio.h b/source4/lib/replace/system/aio.h index 102ed5ceb1..e1b9d836e7 100644 --- a/source4/lib/replace/system/aio.h +++ b/source4/lib/replace/system/aio.h @@ -1,11 +1,11 @@ #ifndef _system_aio_h -#define _system_aoi_h +#define _system_aio_h /* Unix SMB/CIFS implementation. - async io include wrappers + AIO system include wrappers - Copyright (C) Stefan Metzmacher 2006 + Copyright (C) Andrew Tridgell 2006 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 @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef HAVE_LIBAIO_H 1 +#if HAVE_LIBAIO_H #include #endif -- cgit From 274df78541eec948e546bb98901b5bb00aaadc00 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Jan 2007 07:15:47 +0000 Subject: r20788: - remove epoll configure checks from libreplace - fix epoll configure checks for the epoll and aio events backends - we should only activate the epoll backend if sys/epoll.h and epoll_create() are found - we should only activate the aio backend if sys/epoll.h, epoll_create(), libaio.h and io_getevents() are found hopefully fix the build on 'bnhtest' in the build farm... metze (This used to be commit d46a5efb03ea1df50567cad00e1589870cdb31fe) --- source4/lib/replace/system/select.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/select.h b/source4/lib/replace/system/select.h index 0d1eabbc35..20346259c2 100644 --- a/source4/lib/replace/system/select.h +++ b/source4/lib/replace/system/select.h @@ -30,13 +30,4 @@ #define SELECT_CAST #endif -/* use epoll if it is available */ -#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_SYS_EPOLL_H) -#define WITH_EPOLL 1 -#endif - -#if WITH_EPOLL -#include -#endif - #endif -- cgit From 71f6a4d05bf46ca9456a3bc9f2d3263936b18ae2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Jan 2007 19:08:03 +0000 Subject: r20816: merge from samba3: include setjmp.h via system/wait.h metze (This used to be commit 1b10cbb62950693760d4af6ab8691a4ba70908c9) --- source4/lib/replace/system/wait.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/wait.h b/source4/lib/replace/system/wait.h index c2041a5938..3855f7ae72 100644 --- a/source4/lib/replace/system/wait.h +++ b/source4/lib/replace/system/wait.h @@ -36,4 +36,8 @@ #define SIGNAL_CAST (RETSIGTYPE (*)(int)) #endif +#ifdef HAVE_SETJMP_H +#include +#endif + #endif -- cgit From 0ce02a2c0eb322502bd931e83fa23ce476198e06 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Jan 2007 19:27:45 +0000 Subject: r20819: - include system/aio.h - use full prototype for main - use ifdef instead if metze (This used to be commit b3a3c44f42455d6f84ab2f1f282fb177f8b6013c) --- source4/lib/replace/system/aio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/aio.h b/source4/lib/replace/system/aio.h index e1b9d836e7..45154ccb27 100644 --- a/source4/lib/replace/system/aio.h +++ b/source4/lib/replace/system/aio.h @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if HAVE_LIBAIO_H +#ifdef HAVE_LIBAIO_H #include #endif -- cgit From cf8eef4ad88af40d2cf147686c1877cd380b452c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 21 Jan 2007 10:32:39 +0000 Subject: r20930: use sigaction() instead of signal() add support for sa_flags argument to event_add_signal(). These are passed to sigaction(). Special handling is provided for SA_RESETHAND (which tells the event system to remove the handler after the signal) and SA_SIGINFO which allows the siginfo structure to be received per signal (This used to be commit 1bb10b6cf7d717ad21834e73a4ca4b22b5fb6f0a) --- source4/lib/replace/system/wait.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/wait.h b/source4/lib/replace/system/wait.h index 3855f7ae72..179ef0774e 100644 --- a/source4/lib/replace/system/wait.h +++ b/source4/lib/replace/system/wait.h @@ -40,4 +40,8 @@ #include #endif +#ifndef SA_RESETHAND +#define SA_RESETHAND SA_ONESHOT +#endif + #endif -- cgit From 6262602b4ff1aff61103069b03b707fb66334555 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 15 Apr 2007 16:30:01 +0000 Subject: r22217: merge from samba3 21944: move acl header checks to the correct place only metze (This used to be commit be84eb68e1f0d3826b9f819fa44d8b399e38cbcd) --- source4/lib/replace/system/config.m4 | 3 ++- source4/lib/replace/system/filesys.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4 index 4d66317a5e..74278787e7 100644 --- a/source4/lib/replace/system/config.m4 +++ b/source4/lib/replace/system/config.m4 @@ -1,6 +1,7 @@ # filesys AC_HEADER_DIRENT -AC_CHECK_HEADERS(fcntl.h sys/fcntl.h sys/acl.h sys/resource.h sys/ioctl.h sys/mode.h sys/filio.h sys/fs/s5param.h sys/filsys.h ) +AC_CHECK_HEADERS(fcntl.h sys/fcntl.h sys/resource.h sys/ioctl.h sys/mode.h sys/filio.h sys/fs/s5param.h sys/filsys.h) +AC_CHECK_HEADERS(sys/acl.h acl/libacl.h) # select AC_CHECK_HEADERS(sys/select.h) diff --git a/source4/lib/replace/system/filesys.h b/source4/lib/replace/system/filesys.h index 1e48f7ab40..3b68abe48a 100644 --- a/source4/lib/replace/system/filesys.h +++ b/source4/lib/replace/system/filesys.h @@ -41,6 +41,10 @@ #include #endif +#ifdef HAVE_ACL_LIBACL_H +#include +#endif + #ifdef HAVE_SYS_FS_S5PARAM_H #include #endif -- cgit From c3b00b471aaa4a0da7f2743ae2170a36bb11a16f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 13 May 2007 15:53:59 +0000 Subject: r22827: Change license to LGPL (discussed with tridge). (This used to be commit 1193c759622edd9e6843d9b7f53d9532748ce8a0) --- source4/lib/replace/system/aio.h | 26 +++++++++++++++----------- source4/lib/replace/system/capability.h | 26 +++++++++++++++----------- source4/lib/replace/system/dir.h | 26 +++++++++++++++----------- source4/lib/replace/system/filesys.h | 27 ++++++++++++++++----------- source4/lib/replace/system/glob.h | 27 ++++++++++++++++----------- source4/lib/replace/system/iconv.h | 27 ++++++++++++++++----------- source4/lib/replace/system/kerberos.h | 27 ++++++++++++++++----------- source4/lib/replace/system/locale.h | 27 ++++++++++++++++----------- source4/lib/replace/system/network.h | 27 ++++++++++++++++----------- source4/lib/replace/system/passwd.h | 27 ++++++++++++++++----------- source4/lib/replace/system/printing.h | 27 ++++++++++++++++----------- source4/lib/replace/system/readline.h | 29 +++++++++++++++++------------ source4/lib/replace/system/select.h | 27 ++++++++++++++++----------- source4/lib/replace/system/shmem.h | 27 ++++++++++++++++----------- source4/lib/replace/system/syslog.h | 27 ++++++++++++++++----------- source4/lib/replace/system/terminal.h | 27 ++++++++++++++++----------- source4/lib/replace/system/time.h | 29 +++++++++++++++++------------ source4/lib/replace/system/wait.h | 29 +++++++++++++++++------------ 18 files changed, 288 insertions(+), 201 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/aio.h b/source4/lib/replace/system/aio.h index 45154ccb27..624575f619 100644 --- a/source4/lib/replace/system/aio.h +++ b/source4/lib/replace/system/aio.h @@ -7,19 +7,23 @@ Copyright (C) Andrew Tridgell 2006 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifdef HAVE_LIBAIO_H diff --git a/source4/lib/replace/system/capability.h b/source4/lib/replace/system/capability.h index 6ed8ae8de0..23e5969145 100644 --- a/source4/lib/replace/system/capability.h +++ b/source4/lib/replace/system/capability.h @@ -7,19 +7,23 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifdef HAVE_SYS_CAPABILITY_H diff --git a/source4/lib/replace/system/dir.h b/source4/lib/replace/system/dir.h index 64e413c907..01607b384f 100644 --- a/source4/lib/replace/system/dir.h +++ b/source4/lib/replace/system/dir.h @@ -7,19 +7,23 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #if HAVE_DIRENT_H diff --git a/source4/lib/replace/system/filesys.h b/source4/lib/replace/system/filesys.h index 3b68abe48a..a1a0412f37 100644 --- a/source4/lib/replace/system/filesys.h +++ b/source4/lib/replace/system/filesys.h @@ -7,19 +7,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #include diff --git a/source4/lib/replace/system/glob.h b/source4/lib/replace/system/glob.h index 0e51f397c6..ea546ff7f7 100644 --- a/source4/lib/replace/system/glob.h +++ b/source4/lib/replace/system/glob.h @@ -7,19 +7,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef HAVE_GLOB_H diff --git a/source4/lib/replace/system/iconv.h b/source4/lib/replace/system/iconv.h index abc2d6f4e1..2b2832a796 100644 --- a/source4/lib/replace/system/iconv.h +++ b/source4/lib/replace/system/iconv.h @@ -7,19 +7,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #if !defined(HAVE_ICONV) && defined(HAVE_ICONV_H) diff --git a/source4/lib/replace/system/kerberos.h b/source4/lib/replace/system/kerberos.h index 1617b96aad..8a849c4fb6 100644 --- a/source4/lib/replace/system/kerberos.h +++ b/source4/lib/replace/system/kerberos.h @@ -8,19 +8,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef HAVE_KRB5 diff --git a/source4/lib/replace/system/locale.h b/source4/lib/replace/system/locale.h index 82b179dc5b..aa1e1e619e 100644 --- a/source4/lib/replace/system/locale.h +++ b/source4/lib/replace/system/locale.h @@ -8,19 +8,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef HAVE_CTYPE_H diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 5e648dcd15..64c7cd3399 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -7,19 +7,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef HAVE_SYS_SOCKET_H diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 21f31f0388..d51914eb50 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/lib/replace/system/passwd.h @@ -8,19 +8,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef HAVE_PWD_H diff --git a/source4/lib/replace/system/printing.h b/source4/lib/replace/system/printing.h index 489ccb1da8..3054811453 100644 --- a/source4/lib/replace/system/printing.h +++ b/source4/lib/replace/system/printing.h @@ -8,19 +8,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef AIX diff --git a/source4/lib/replace/system/readline.h b/source4/lib/replace/system/readline.h index 4a64ef1376..3a253058e2 100644 --- a/source4/lib/replace/system/readline.h +++ b/source4/lib/replace/system/readline.h @@ -3,21 +3,26 @@ /* Unix SMB/CIFS implementation. - readline wrappers + Readline wrappers - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef HAVE_LIBREADLINE diff --git a/source4/lib/replace/system/select.h b/source4/lib/replace/system/select.h index 20346259c2..97140e1d73 100644 --- a/source4/lib/replace/system/select.h +++ b/source4/lib/replace/system/select.h @@ -7,19 +7,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef HAVE_SYS_SELECT_H diff --git a/source4/lib/replace/system/shmem.h b/source4/lib/replace/system/shmem.h index 26fa7c8d43..234ec1c14a 100644 --- a/source4/lib/replace/system/shmem.h +++ b/source4/lib/replace/system/shmem.h @@ -7,19 +7,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #if defined(HAVE_SYS_IPC_H) diff --git a/source4/lib/replace/system/syslog.h b/source4/lib/replace/system/syslog.h index e123830a70..f949c7a8d9 100644 --- a/source4/lib/replace/system/syslog.h +++ b/source4/lib/replace/system/syslog.h @@ -7,19 +7,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef HAVE_SYSLOG_H diff --git a/source4/lib/replace/system/terminal.h b/source4/lib/replace/system/terminal.h index 94d6b5cc98..292c85ab6f 100644 --- a/source4/lib/replace/system/terminal.h +++ b/source4/lib/replace/system/terminal.h @@ -7,19 +7,24 @@ Copyright (C) Andrew Tridgell 2004 - 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. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef SUNOS4 diff --git a/source4/lib/replace/system/time.h b/source4/lib/replace/system/time.h index e7c88f133d..a0924f4051 100644 --- a/source4/lib/replace/system/time.h +++ b/source4/lib/replace/system/time.h @@ -6,20 +6,25 @@ time system include wrappers Copyright (C) Andrew Tridgell 2004 + + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - 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, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef TIME_WITH_SYS_TIME diff --git a/source4/lib/replace/system/wait.h b/source4/lib/replace/system/wait.h index 179ef0774e..96b5c2cb80 100644 --- a/source4/lib/replace/system/wait.h +++ b/source4/lib/replace/system/wait.h @@ -6,20 +6,25 @@ waitpid system include wrappers Copyright (C) Andrew Tridgell 2004 + + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - 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, + 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 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 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., 675 Mass Ave, Cambridge, MA 02139, USA. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef HAVE_SYS_WAIT_H -- cgit From bc02bba4499b7f6c78dc5db0610fe4f4d238829a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 14 May 2007 00:31:04 +0000 Subject: r22829: system/select.h needs to bring in epoll.h for epoll usage in lib/events (This used to be commit 2c9d0b57f9cef96ac0878a9761f3c15774fda336) --- source4/lib/replace/system/select.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/select.h b/source4/lib/replace/system/select.h index 97140e1d73..a196f9c478 100644 --- a/source4/lib/replace/system/select.h +++ b/source4/lib/replace/system/select.h @@ -31,6 +31,10 @@ #include #endif +#ifdef HAVE_SYS_EPOLL_H +#include +#endif + #ifndef SELECT_CAST #define SELECT_CAST #endif -- cgit From 9c6c4848c941971f186a2cbcefcd07e5a1a55544 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 30 May 2007 08:14:59 +0000 Subject: r23237: update lib/replace from ctdb (This used to be commit 361c5995bcf1dafb89f935ac4183dc295e1d524d) --- source4/lib/replace/system/filesys.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/filesys.h b/source4/lib/replace/system/filesys.h index a1a0412f37..b3c339a144 100644 --- a/source4/lib/replace/system/filesys.h +++ b/source4/lib/replace/system/filesys.h @@ -38,6 +38,10 @@ #include #endif +#ifdef HAVE_MNTENT_H +#include +#endif + #ifdef HAVE_SYS_VFS_H #include #endif -- cgit From b8d69a7ea2505b706ff7c74d7c97bc89d82dfa07 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:46:15 +0000 Subject: r23795: more v2->v3 conversion (This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac) --- source4/lib/replace/system/aio.h | 2 +- source4/lib/replace/system/capability.h | 2 +- source4/lib/replace/system/dir.h | 2 +- source4/lib/replace/system/filesys.h | 2 +- source4/lib/replace/system/glob.h | 2 +- source4/lib/replace/system/iconv.h | 2 +- source4/lib/replace/system/kerberos.h | 2 +- source4/lib/replace/system/locale.h | 2 +- source4/lib/replace/system/network.h | 2 +- source4/lib/replace/system/passwd.h | 2 +- source4/lib/replace/system/printing.h | 2 +- source4/lib/replace/system/readline.h | 2 +- source4/lib/replace/system/select.h | 2 +- source4/lib/replace/system/shmem.h | 2 +- source4/lib/replace/system/syslog.h | 2 +- source4/lib/replace/system/terminal.h | 2 +- source4/lib/replace/system/time.h | 2 +- source4/lib/replace/system/wait.h | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/aio.h b/source4/lib/replace/system/aio.h index 624575f619..8bc4fdfd42 100644 --- a/source4/lib/replace/system/aio.h +++ b/source4/lib/replace/system/aio.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/capability.h b/source4/lib/replace/system/capability.h index 23e5969145..c2048d3946 100644 --- a/source4/lib/replace/system/capability.h +++ b/source4/lib/replace/system/capability.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/dir.h b/source4/lib/replace/system/dir.h index 01607b384f..d6829c3f19 100644 --- a/source4/lib/replace/system/dir.h +++ b/source4/lib/replace/system/dir.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/filesys.h b/source4/lib/replace/system/filesys.h index b3c339a144..aa86a9f58f 100644 --- a/source4/lib/replace/system/filesys.h +++ b/source4/lib/replace/system/filesys.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/glob.h b/source4/lib/replace/system/glob.h index ea546ff7f7..c05e9f64f7 100644 --- a/source4/lib/replace/system/glob.h +++ b/source4/lib/replace/system/glob.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/iconv.h b/source4/lib/replace/system/iconv.h index 2b2832a796..a7299799d1 100644 --- a/source4/lib/replace/system/iconv.h +++ b/source4/lib/replace/system/iconv.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/kerberos.h b/source4/lib/replace/system/kerberos.h index 8a849c4fb6..685d2e9462 100644 --- a/source4/lib/replace/system/kerberos.h +++ b/source4/lib/replace/system/kerberos.h @@ -15,7 +15,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/locale.h b/source4/lib/replace/system/locale.h index aa1e1e619e..9b47cb1ef4 100644 --- a/source4/lib/replace/system/locale.h +++ b/source4/lib/replace/system/locale.h @@ -15,7 +15,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 64c7cd3399..4594f2237d 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index d51914eb50..6820d05b97 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/lib/replace/system/passwd.h @@ -15,7 +15,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/printing.h b/source4/lib/replace/system/printing.h index 3054811453..cccd6b0e62 100644 --- a/source4/lib/replace/system/printing.h +++ b/source4/lib/replace/system/printing.h @@ -15,7 +15,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/readline.h b/source4/lib/replace/system/readline.h index 3a253058e2..0dbdd70618 100644 --- a/source4/lib/replace/system/readline.h +++ b/source4/lib/replace/system/readline.h @@ -12,7 +12,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/select.h b/source4/lib/replace/system/select.h index a196f9c478..635b725d79 100644 --- a/source4/lib/replace/system/select.h +++ b/source4/lib/replace/system/select.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/shmem.h b/source4/lib/replace/system/shmem.h index 234ec1c14a..80b4b65f44 100644 --- a/source4/lib/replace/system/shmem.h +++ b/source4/lib/replace/system/shmem.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/syslog.h b/source4/lib/replace/system/syslog.h index f949c7a8d9..fd7214f73d 100644 --- a/source4/lib/replace/system/syslog.h +++ b/source4/lib/replace/system/syslog.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/terminal.h b/source4/lib/replace/system/terminal.h index 292c85ab6f..56f6aedeff 100644 --- a/source4/lib/replace/system/terminal.h +++ b/source4/lib/replace/system/terminal.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/time.h b/source4/lib/replace/system/time.h index a0924f4051..d3dc6da4ad 100644 --- a/source4/lib/replace/system/time.h +++ b/source4/lib/replace/system/time.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 diff --git a/source4/lib/replace/system/wait.h b/source4/lib/replace/system/wait.h index 96b5c2cb80..8b2daa9ffc 100644 --- a/source4/lib/replace/system/wait.h +++ b/source4/lib/replace/system/wait.h @@ -14,7 +14,7 @@ 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 of the License, or (at your option) any later version. + version 3 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 -- cgit From 6c973f4e8ccbcb6c9275f8a54e26abb19df7e15a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 03:42:26 +0000 Subject: r23798: updated old Temple Place FSF addresses to new URL (This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb) --- source4/lib/replace/system/aio.h | 3 +-- source4/lib/replace/system/capability.h | 3 +-- source4/lib/replace/system/dir.h | 3 +-- source4/lib/replace/system/filesys.h | 3 +-- source4/lib/replace/system/glob.h | 3 +-- source4/lib/replace/system/iconv.h | 3 +-- source4/lib/replace/system/kerberos.h | 3 +-- source4/lib/replace/system/locale.h | 3 +-- source4/lib/replace/system/network.h | 3 +-- source4/lib/replace/system/passwd.h | 3 +-- source4/lib/replace/system/printing.h | 3 +-- source4/lib/replace/system/readline.h | 3 +-- source4/lib/replace/system/select.h | 3 +-- source4/lib/replace/system/shmem.h | 3 +-- source4/lib/replace/system/syslog.h | 3 +-- source4/lib/replace/system/terminal.h | 3 +-- source4/lib/replace/system/time.h | 3 +-- source4/lib/replace/system/wait.h | 3 +-- 18 files changed, 18 insertions(+), 36 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/aio.h b/source4/lib/replace/system/aio.h index 8bc4fdfd42..784d77fa28 100644 --- a/source4/lib/replace/system/aio.h +++ b/source4/lib/replace/system/aio.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ #ifdef HAVE_LIBAIO_H diff --git a/source4/lib/replace/system/capability.h b/source4/lib/replace/system/capability.h index c2048d3946..4fe7c8d51b 100644 --- a/source4/lib/replace/system/capability.h +++ b/source4/lib/replace/system/capability.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ #ifdef HAVE_SYS_CAPABILITY_H diff --git a/source4/lib/replace/system/dir.h b/source4/lib/replace/system/dir.h index d6829c3f19..dec2d54649 100644 --- a/source4/lib/replace/system/dir.h +++ b/source4/lib/replace/system/dir.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ #if HAVE_DIRENT_H diff --git a/source4/lib/replace/system/filesys.h b/source4/lib/replace/system/filesys.h index aa86a9f58f..4bf1f64865 100644 --- a/source4/lib/replace/system/filesys.h +++ b/source4/lib/replace/system/filesys.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/glob.h b/source4/lib/replace/system/glob.h index c05e9f64f7..3e23db6828 100644 --- a/source4/lib/replace/system/glob.h +++ b/source4/lib/replace/system/glob.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/iconv.h b/source4/lib/replace/system/iconv.h index a7299799d1..3c8a71f2f7 100644 --- a/source4/lib/replace/system/iconv.h +++ b/source4/lib/replace/system/iconv.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/kerberos.h b/source4/lib/replace/system/kerberos.h index 685d2e9462..78aa7b943f 100644 --- a/source4/lib/replace/system/kerberos.h +++ b/source4/lib/replace/system/kerberos.h @@ -23,8 +23,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/locale.h b/source4/lib/replace/system/locale.h index 9b47cb1ef4..e73a9bb274 100644 --- a/source4/lib/replace/system/locale.h +++ b/source4/lib/replace/system/locale.h @@ -23,8 +23,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 4594f2237d..13d95a8ba7 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 6820d05b97..4e858fc89c 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/lib/replace/system/passwd.h @@ -23,8 +23,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/printing.h b/source4/lib/replace/system/printing.h index cccd6b0e62..7eb02d004a 100644 --- a/source4/lib/replace/system/printing.h +++ b/source4/lib/replace/system/printing.h @@ -23,8 +23,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/readline.h b/source4/lib/replace/system/readline.h index 0dbdd70618..ba34dc6a61 100644 --- a/source4/lib/replace/system/readline.h +++ b/source4/lib/replace/system/readline.h @@ -20,8 +20,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/select.h b/source4/lib/replace/system/select.h index 635b725d79..da18de0cfc 100644 --- a/source4/lib/replace/system/select.h +++ b/source4/lib/replace/system/select.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/shmem.h b/source4/lib/replace/system/shmem.h index 80b4b65f44..64fe39b6cb 100644 --- a/source4/lib/replace/system/shmem.h +++ b/source4/lib/replace/system/shmem.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/syslog.h b/source4/lib/replace/system/syslog.h index fd7214f73d..104be1df84 100644 --- a/source4/lib/replace/system/syslog.h +++ b/source4/lib/replace/system/syslog.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/terminal.h b/source4/lib/replace/system/terminal.h index 56f6aedeff..9ad601ace0 100644 --- a/source4/lib/replace/system/terminal.h +++ b/source4/lib/replace/system/terminal.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/time.h b/source4/lib/replace/system/time.h index d3dc6da4ad..6bbb6b15bb 100644 --- a/source4/lib/replace/system/time.h +++ b/source4/lib/replace/system/time.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ diff --git a/source4/lib/replace/system/wait.h b/source4/lib/replace/system/wait.h index 8b2daa9ffc..de94cf09d5 100644 --- a/source4/lib/replace/system/wait.h +++ b/source4/lib/replace/system/wait.h @@ -22,8 +22,7 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ -- cgit From d0f3d4a2f1c674f6b07b6ec4640a2c8d033bad2a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Sep 2007 01:39:31 +0000 Subject: r25017: Move MAXHOSTNAMELEN definition to replace.h as it is usually part of sys/param.h. (This used to be commit 7016d500287ae587d044744f2a318c402148ebea) --- source4/lib/replace/system/network.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 13d95a8ba7..7469040b28 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -98,14 +98,6 @@ char *rep_inet_ntoa(struct in_addr ip); #define MSG_WAITALL 0 #endif -/* - * Some older systems seem not to have MAXHOSTNAMELEN - * defined. - */ -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 254 -#endif - #ifndef INADDR_LOOPBACK #define INADDR_LOOPBACK 0x7f000001 #endif -- cgit From e511090a4339221dfd1fa597964af7455f96ec28 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 5 Oct 2007 23:54:12 +0000 Subject: r25543: Merge libreplace support for inet_pton, inet_ntop, getaddrinfo, getnameinfo (and friends) from SAMBA_3_2, with some minor tweaks: - avoid including network headers in replace.h unless absolutely required - autoconf tests for getaddrinfo() in lib/replace The heimdal-specific code also no longer looks for these functions anymore. (This used to be commit b6d3fd84a5d7d814035e60d6fa22f19bed9f77da) --- source4/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 7469040b28..877f5f25e6 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -49,6 +49,10 @@ #include #endif +#if !defined(HAVE_GETADDRINFO) +#include "getaddrinfo.h" +#endif + /* * The next three defines are needed to access the IPTOS_* options * on some systems. -- cgit From 39f5745c16e294d95591edb44645ca9751fcee9c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 10 Oct 2007 07:18:24 +0000 Subject: r25597: HPUX doesn't have INET_ADDRSTRLEN defined metze (This used to be commit f9696109cc8f4646599f73b78e1eacd94d1a6c2c) --- source4/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 877f5f25e6..02942f9a44 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -110,4 +110,8 @@ char *rep_inet_ntoa(struct in_addr ip); #define INADDR_NONE 0xffffffff #endif +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN 16 +#endif + #endif -- cgit From 6876d2613da8e579146040babd33e71fc1889d46 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 10 Oct 2007 11:57:16 +0200 Subject: r25601: replace.h should never imply any "system/*.h" (here it's "system/time.h") metze (This used to be commit 00467c25930a527eb9831cfd893bd8e217ca4f74) --- source4/lib/replace/system/time.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/time.h b/source4/lib/replace/system/time.h index 6bbb6b15bb..036812ab8f 100644 --- a/source4/lib/replace/system/time.h +++ b/source4/lib/replace/system/time.h @@ -41,4 +41,14 @@ #include #endif +#ifndef HAVE_MKTIME +/* define is in "replace.h" */ +time_t rep_mktime(struct tm *t); +#endif + +#ifndef HAVE_TIMEGM +/* define is in "replace.h" */ +time_t rep_timegm(struct tm *tm); +#endif + #endif -- cgit From a3e5710eda2e9fc7ee9dce1e9082dbf03f96faeb Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 10 Oct 2007 12:09:06 +0200 Subject: r25602: don't imply "system/network.h" within replace.h, as this brings in the socket_wrapper.h in unexpected code and we endup with a missing 'swrap_close' while linking metze (This used to be commit 507d5ca7d994f0771dbb66e61d2d22e391508658) --- source4/lib/replace/system/network.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 02942f9a44..8b911cf7d3 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -90,8 +90,18 @@ #endif #ifdef REPLACE_INET_NTOA +/* define is in "replace.h" */ char *rep_inet_ntoa(struct in_addr ip); -#define inet_ntoa rep_inet_ntoa +#endif + +#ifndef HAVE_INET_PTON +/* define is in "replace.h" */ +int rep_inet_pton(int af, const char *src, void *dst); +#endif + +#ifndef HAVE_INET_NTOP +/* define is in "replace.h" */ +const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif /* -- cgit From ce7a3abcd8174c9693db853734f3d17bde9a4194 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 17 Oct 2007 13:58:19 +0200 Subject: r25677: add missing stuff from samba3 metze (This used to be commit d286c0533dd2726ebc547dcaf99f45169d4a9d2f) --- source4/lib/replace/system/network.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 8b911cf7d3..0b0dbcb88d 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -120,8 +120,38 @@ const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); #define INADDR_NONE 0xffffffff #endif +#ifndef EAFNOSUPPORT +#define EAFNOSUPPORT EINVAL +#endif + #ifndef INET_ADDRSTRLEN #define INET_ADDRSTRLEN 16 #endif +#ifndef INET6_ADDRSTRLEN +#define INET6_ADDRSTRLEN 46 +#endif + +#ifndef HAVE_SOCKLEN_T +typedef int socklen_t; +#endif + +#ifndef HAVE_SA_FAMILY_T +typedef unsigned short int sa_family_t; +#endif + +#ifndef HAVE_STRUCT_SOCKADDR_STORAGE +#ifdef HAVE_STRUCT_SOCKADDR_IN6 +#define sockaddr_storage sockaddr_in6 +#define ss_family sin6_family +#else +#define sockaddr_storage sockaddr_in +#define ss_family sin_family +#endif +#endif + +#ifndef HOST_NAME_MAX +#define HOST_NAME_MAX 256 +#endif + #endif -- cgit From c68e3d8d652109edd95999755b31fd123bbffc90 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 17 Oct 2007 14:02:06 +0200 Subject: r25685: rename getsmbpass -> rep_getpass and provide the function prototype metze (cherry picked from commit 96820f8d8f6522fc264efda0f069e2f6a420ac2e) (This used to be commit cd5069a8ca17a3a14814c0fbf55f113690291165) --- source4/lib/replace/system/passwd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 4e858fc89c..53d35e7b87 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/lib/replace/system/passwd.h @@ -65,7 +65,8 @@ #endif #ifdef REPLACE_GETPASS -#define getpass(prompt) getsmbpass((prompt)) +#define getpass(prompt) rep_getpass(prompt) +char *rep_getpass(const char *prompt); #endif #ifndef NGROUPS_MAX -- cgit From 9f53479997da6768113c347e4e31374328f72835 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 17 Oct 2007 14:02:33 +0200 Subject: r25687: Move #defined for getaddrinfo into network.h (as other defines). Allows RHEL4 compile to work. Jeremy. (cherry picked from commit 0ffdf4fdeea88c21880c8bf69d8db56fb49effa7) (This used to be commit facb811bb3c77a0b98089c283fe0707c5f486c88) --- source4/lib/replace/system/network.h | 95 ++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 4 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 0b0dbcb88d..61de2b728d 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -49,10 +49,6 @@ #include #endif -#if !defined(HAVE_GETADDRINFO) -#include "getaddrinfo.h" -#endif - /* * The next three defines are needed to access the IPTOS_* options * on some systems. @@ -104,6 +100,97 @@ int rep_inet_pton(int af, const char *src, void *dst); const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif +#if !defined(HAVE_GETADDRINFO) +#include "getaddrinfo.h" +#endif + +/* + * Some systems have getaddrinfo but not the + * defines needed to use it. + */ + +/* Various macros that ought to be in , but might not be */ + +#ifndef EAI_FAIL +#define EAI_BADFLAGS (-1) +#define EAI_NONAME (-2) +#define EAI_AGAIN (-3) +#define EAI_FAIL (-4) +#define EAI_FAMILY (-6) +#define EAI_SOCKTYPE (-7) +#define EAI_SERVICE (-8) +#define EAI_MEMORY (-10) +#define EAI_SYSTEM (-11) +#endif /* !EAI_FAIL */ + +#ifndef AI_PASSIVE +#define AI_PASSIVE 0x0001 +#endif + +#ifndef AI_CANONNAME +#define AI_CANONNAME 0x0002 +#endif + +#ifndef AI_NUMERICHOST +/* + * some platforms don't support AI_NUMERICHOST; define as zero if using + * the system version of getaddrinfo... + */ +#if defined(HAVE_STRUCT_ADDRINFO) && defined(HAVE_GETADDRINFO) +#define AI_NUMERICHOST 0 +#else +#define AI_NUMERICHOST 0x0004 +#endif +#endif + +#ifndef AI_ADDRCONFIG +#define AI_ADDRCONFIG 0x0020 +#endif + +#ifndef NI_NUMERICHOST +#define NI_NUMERICHOST 1 +#endif + +#ifndef NI_NUMERICSERV +#define NI_NUMERICSERV 2 +#endif + +#ifndef NI_NOFQDN +#define NI_NOFQDN 4 +#endif + +#ifndef NI_NAMEREQD +#define NI_NAMEREQD 8 +#endif + +#ifndef NI_DGRAM +#define NI_DGRAM 16 +#endif + + +#ifndef NI_MAXHOST +#define NI_MAXHOST 1025 +#endif + +#ifndef NI_MAXSERV +#define NI_MAXSERV 32 +#endif + +#ifndef HAVE_STRUCT_ADDRINFO + +struct addrinfo +{ + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + size_t ai_addrlen; + struct sockaddr *ai_addr; + char *ai_canonname; + struct addrinfo *ai_next; +}; +#endif /* HAVE_STRUCT_ADDRINFO */ + /* * glibc on linux doesn't seem to have MSG_WAITALL * defined. I think the kernel has it though.. -- cgit From 1cfd89c6aa50334b21fb8db16ab79a42679dd54b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 24 Oct 2007 12:53:34 +0200 Subject: r25713: [libreplace] include socket_wrapper.h after we have typedef'ed socklen_t metze (This used to be commit a3657a4e7175e35707e7a00330f6924833774253) --- source4/lib/replace/system/network.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 61de2b728d..79fe21405f 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -78,13 +78,6 @@ #include #endif -#ifdef SOCKET_WRAPPER -#ifndef SOCKET_WRAPPER_NOT_REPLACE -#define SOCKET_WRAPPER_REPLACE -#endif -#include "lib/socket_wrapper/socket_wrapper.h" -#endif - #ifdef REPLACE_INET_NTOA /* define is in "replace.h" */ char *rep_inet_ntoa(struct in_addr ip); @@ -241,4 +234,11 @@ typedef unsigned short int sa_family_t; #define HOST_NAME_MAX 256 #endif +#ifdef SOCKET_WRAPPER +#ifndef SOCKET_WRAPPER_NOT_REPLACE +#define SOCKET_WRAPPER_REPLACE +#endif +#include "lib/socket_wrapper/socket_wrapper.h" +#endif + #endif -- cgit From c01f61340bb1792d08e649708124f07ec19cc23d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 24 Oct 2007 12:55:40 +0200 Subject: r25714: [libreplace] move define of a constant to near to the others metze (This used to be commit 8bd2cf71bee1a08c3d420a330730434edbac5e28) --- source4/lib/replace/system/network.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 79fe21405f..1ac881e496 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -212,6 +212,10 @@ struct addrinfo #define INET6_ADDRSTRLEN 46 #endif +#ifndef HOST_NAME_MAX +#define HOST_NAME_MAX 256 +#endif + #ifndef HAVE_SOCKLEN_T typedef int socklen_t; #endif @@ -230,10 +234,6 @@ typedef unsigned short int sa_family_t; #endif #endif -#ifndef HOST_NAME_MAX -#define HOST_NAME_MAX 256 -#endif - #ifdef SOCKET_WRAPPER #ifndef SOCKET_WRAPPER_NOT_REPLACE #define SOCKET_WRAPPER_REPLACE -- cgit From 582496f5d0e13e514e9c7cb02b138e730b8377d0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 24 Oct 2007 12:57:57 +0200 Subject: r25715: [libreplace] move definition of struct addrinfo so that it can use socklen_t metze (This used to be commit 12cec014c465a55974aedf44e0e782f5fb841088) --- source4/lib/replace/system/network.h | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 1ac881e496..774776dca3 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -169,21 +169,6 @@ const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); #define NI_MAXSERV 32 #endif -#ifndef HAVE_STRUCT_ADDRINFO - -struct addrinfo -{ - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - size_t ai_addrlen; - struct sockaddr *ai_addr; - char *ai_canonname; - struct addrinfo *ai_next; -}; -#endif /* HAVE_STRUCT_ADDRINFO */ - /* * glibc on linux doesn't seem to have MSG_WAITALL * defined. I think the kernel has it though.. @@ -234,6 +219,19 @@ typedef unsigned short int sa_family_t; #endif #endif +#ifndef HAVE_STRUCT_ADDRINFO +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + socklen_t ai_addrlen; + struct sockaddr *ai_addr; + char *ai_canonname; + struct addrinfo *ai_next; +}; +#endif /* HAVE_STRUCT_ADDRINFO */ + #ifdef SOCKET_WRAPPER #ifndef SOCKET_WRAPPER_NOT_REPLACE #define SOCKET_WRAPPER_REPLACE -- cgit From 31569f1c881a735ef3db173ef57881540b0c5537 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 24 Oct 2007 13:01:03 +0200 Subject: r25718: [libreplace] if we replace types define the HAVE_ macro this is needed as heimdal's roken.h also tries to replace the types metze (This used to be commit 8b92b811015d0855efe3cf4c58cd08e3654f8e88) --- source4/lib/replace/system/network.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 774776dca3..44a1dcc8e1 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -202,10 +202,12 @@ const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif #ifndef HAVE_SOCKLEN_T +#define HAVE_SOCKLEN_T typedef int socklen_t; #endif #ifndef HAVE_SA_FAMILY_T +#define HAVE_SA_FAMILY_T typedef unsigned short int sa_family_t; #endif @@ -220,6 +222,7 @@ typedef unsigned short int sa_family_t; #endif #ifndef HAVE_STRUCT_ADDRINFO +#define HAVE_STRUCT_ADDRINFO struct addrinfo { int ai_flags; int ai_family; -- cgit From 88f6c5a1d2c337ffe7505e20b96a6b47dab1c063 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 25 Oct 2007 06:53:38 +0200 Subject: r25724: - include getaddrinfo.h after we have defined struct addrinfo - use rep_ instead of pg_ as prefix in getaddrinfo.[ch] - define HAVE_ macros when we replace functions metze (This used to be commit 57d5cf4b5fe8885b1375059aa143c9c71d2503b4) --- source4/lib/replace/system/network.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 44a1dcc8e1..5de363f134 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -93,10 +93,6 @@ int rep_inet_pton(int af, const char *src, void *dst); const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif -#if !defined(HAVE_GETADDRINFO) -#include "getaddrinfo.h" -#endif - /* * Some systems have getaddrinfo but not the * defines needed to use it. @@ -212,6 +208,7 @@ typedef unsigned short int sa_family_t; #endif #ifndef HAVE_STRUCT_SOCKADDR_STORAGE +#define HAVE_STRUCT_SOCKADDR_STORAGE #ifdef HAVE_STRUCT_SOCKADDR_IN6 #define sockaddr_storage sockaddr_in6 #define ss_family sin6_family @@ -235,6 +232,10 @@ struct addrinfo { }; #endif /* HAVE_STRUCT_ADDRINFO */ +#if !defined(HAVE_GETADDRINFO) +#include "getaddrinfo.h" +#endif + #ifdef SOCKET_WRAPPER #ifndef SOCKET_WRAPPER_NOT_REPLACE #define SOCKET_WRAPPER_REPLACE -- cgit From 74a2b05793851de3bcc12980221e238da5310d8b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 25 Oct 2007 09:16:11 +0200 Subject: r25728: [libreplace] define AI_NUMERICSERV as it's used in getaddrinfo.c metze (This used to be commit 5648c8a0de7482a28a5b95410c083ac87577d482) --- source4/lib/replace/system/network.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 5de363f134..c7b499a932 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -136,6 +136,17 @@ const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); #define AI_ADDRCONFIG 0x0020 #endif +#ifndef AI_NUMERICSERV +/* + * logic copied from AI_NUMERICHOST + */ +#if defined(HAVE_STRUCT_ADDRINFO) && defined(HAVE_GETADDRINFO) +#define AI_NUMERICSERV 0 +#else +#define AI_NUMERICSERV 0x0400 +#endif +#endif + #ifndef NI_NUMERICHOST #define NI_NUMERICHOST 1 #endif -- cgit From 4d354fd58374df6ab5ae52e6cd61988377ceddb2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 5 Nov 2007 15:45:08 +0100 Subject: r25838: libreplace: include nss_wrapper.h if NSS_WRAPPER is defined metze (This used to be commit 17f9189fb4b34dbc08f6aded6b0c81ee8eb07a9f) --- source4/lib/replace/system/passwd.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 53d35e7b87..513947c85d 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/lib/replace/system/passwd.h @@ -93,4 +93,11 @@ char *rep_getpass(const char *prompt); #define ULTRIX_AUTH 1 #endif +#ifdef NSS_WRAPPER +#ifndef NSS_WRAPPER_NOT_REPLACE +#define NSS_WRAPPER_REPLACE +#endif +#include "lib/nss_wrapper/nss_wrapper.h" +#endif + #endif -- cgit From 9ed91eabdd9311f01c2595a60e4b05a5869cc699 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 6 Nov 2007 06:54:49 +0100 Subject: r25863: libreplace: we need include before nss_wrapper.h metze (This used to be commit a16f0e3cdbb9fb1238e25af8bb911c27b839c89b) --- source4/lib/replace/system/passwd.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 513947c85d..36fca7b4f8 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/lib/replace/system/passwd.h @@ -27,6 +27,9 @@ */ +/* this needs to be included before nss_wrapper.h on some systems */ +#include + #ifdef HAVE_PWD_H #include #endif -- cgit From 29598b83e0a39cc0a52252e924733f23d5a21afa Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 6 Nov 2007 07:26:12 +0100 Subject: r25865: libreplace: check for nss passwd|group get*_r functions metze (This used to be commit 98095b34257847b2fbb5efe343c3630a28170692) --- source4/lib/replace/system/config.m4 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4 index 74278787e7..2b2f76a8e6 100644 --- a/source4/lib/replace/system/config.m4 +++ b/source4/lib/replace/system/config.m4 @@ -18,6 +18,8 @@ AC_CHECK_HEADERS(sys/capability.h) # passwd AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h) +AC_CHECK_FUNCS(getpwnam_r getpwuid_r getpwent_r) +AC_CHECK_FUNCS(getgrnam_r getgrgid_r getgrent_r) # locale AC_CHECK_HEADERS(ctype.h locale.h) -- cgit From 49cb694041ac726bbff027bc6d6a9ce0ac5e15f9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 6 Nov 2007 09:15:11 +0100 Subject: r25867: libreplace: solaris has different prototypes for getpwent_r and getgrent_r metze (This used to be commit 44250ac6f987ba98e1efe8cd81b4e7eaa8017ed0) --- source4/lib/replace/system/config.m4 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4 index 2b2f76a8e6..6500535982 100644 --- a/source4/lib/replace/system/config.m4 +++ b/source4/lib/replace/system/config.m4 @@ -19,7 +19,39 @@ AC_CHECK_HEADERS(sys/capability.h) # passwd AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h) AC_CHECK_FUNCS(getpwnam_r getpwuid_r getpwent_r) +AC_HAVE_DECL(getpwent_r, [ + #include + #include + ]) +AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)], + [ + #ifndef HAVE_GETPWENT_R_DECL + #error missing getpwent_r prototype + #endif + return NULL; + ],[ + AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r solaris function prototype]) + ],[],[ + #include + #include + ]) AC_CHECK_FUNCS(getgrnam_r getgrgid_r getgrent_r) +AC_HAVE_DECL(getgrent_r, [ + #include + #include + ]) +AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, int buflen)], + [ + #ifndef HAVE_GETGRENT_R_DECL + #error missing getgrent_r prototype + #endif + return NULL; + ],[ + AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r solaris function prototype]) + ],[],[ + #include + #include + ]) # locale AC_CHECK_HEADERS(ctype.h locale.h) -- cgit From 2cb22d93ae0eef86a4bcf0fe5f7fb138e43db880 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 7 Nov 2007 06:59:02 +0100 Subject: r25892: Keep the tdb code in sync between 3.2.x and 4.0. Add in the alarm fix to allow locks to exit on alarm signal. Sync up the changes in tools. Jeremy. (This used to be commit cb6c663fa8818f49cc36f196bb5f4dea47edd69e) --- source4/lib/replace/system/wait.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/wait.h b/source4/lib/replace/system/wait.h index de94cf09d5..5784b1ae92 100644 --- a/source4/lib/replace/system/wait.h +++ b/source4/lib/replace/system/wait.h @@ -48,4 +48,8 @@ #define SA_RESETHAND SA_ONESHOT #endif +#if !defined(HAVE_SIG_ATOMIC_T_TYPE) +typedef int sig_atomic_t; +#endif + #endif -- cgit From 319ecac5b12dd183b657cb6f5bee2dbbdd013e35 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 9 Nov 2007 08:24:36 +0100 Subject: r25910: Try and fix the Solaris build by adding a missing define (from Jerry). Jeremy merge from v3-2-test commit a68bbea0d42cc64b9fa731ab2a1da82ef30937c6 (This used to be commit b833dce5e6d6475a04538d9754b9b0bfeb5915e4) --- source4/lib/replace/system/network.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index c7b499a932..d3ae2bf398 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -247,6 +247,11 @@ struct addrinfo { #include "getaddrinfo.h" #endif +/* Needed for some systems that don't define it (Solaris). */ +#ifndef ifr_netmask +#define ifr_netmask ifr_addrs +#endif + #ifdef SOCKET_WRAPPER #ifndef SOCKET_WRAPPER_NOT_REPLACE #define SOCKET_WRAPPER_REPLACE -- cgit From b24e7a15051518806b50768cfc2a840d2b395fe3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 22 Nov 2007 14:42:14 +0100 Subject: r26102: libreplace: remove system/printing.h as it only contains samba3 stuff metze (This used to be commit 1ecb4ec01b0506c95a5f90a62040329e7a39ee93) --- source4/lib/replace/system/printing.h | 50 ----------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 source4/lib/replace/system/printing.h (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/printing.h b/source4/lib/replace/system/printing.h deleted file mode 100644 index 7eb02d004a..0000000000 --- a/source4/lib/replace/system/printing.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _system_printing_h -#define _system_printing_h - -/* - Unix SMB/CIFS implementation. - - printing system include wrappers - - Copyright (C) Andrew Tridgell 2004 - - ** NOTE! The following LGPL license applies to the replace - ** library. This does NOT imply that all of Samba is released - ** under the LGPL - - 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 3 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, see . - -*/ - -#ifdef AIX -#define DEFAULT_PRINTING PRINT_AIX -#define PRINTCAP_NAME "/etc/qconfig" -#endif - -#ifdef HPUX -#define DEFAULT_PRINTING PRINT_HPUX -#endif - -#ifdef QNX -#define DEFAULT_PRINTING PRINT_QNX -#endif - -#ifndef DEFAULT_PRINTING -#define DEFAULT_PRINTING PRINT_BSD -#endif -#ifndef PRINTCAP_NAME -#define PRINTCAP_NAME "/etc/printcap" -#endif - -#endif -- cgit From 9e367b13d94770f652cb096595722b17d77ab7b4 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 3 Dec 2007 16:29:54 +0100 Subject: r26253: Add check for broken RedHat 7.2 system header files to lib/replace. This is taken (with slight reformatting) from samba3:configure.in. It is already used in lib/replace/system/capablity.h. Michael (This used to be commit 4d1df9c0b4248717d6f235572f5f68e27934741e) --- source4/lib/replace/system/config.m4 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4 index 6500535982..64143fe371 100644 --- a/source4/lib/replace/system/config.m4 +++ b/source4/lib/replace/system/config.m4 @@ -16,6 +16,28 @@ AC_HEADER_SYS_WAIT # capability AC_CHECK_HEADERS(sys/capability.h) +case "$host_os" in +*linux*) +AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[ +AC_TRY_COMPILE([ + #ifdef HAVE_SYS_VFS_H + #include + #endif + #ifdef HAVE_SYS_CAPABILITY_H + #include + #endif + ],[ + int i; + ], + samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no, + samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes +)]) +if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then + AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files]) +fi +;; +esac + # passwd AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h) AC_CHECK_FUNCS(getpwnam_r getpwuid_r getpwent_r) -- cgit From b08a82de587afdd561d55580957fec7cbeb2e43f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 3 Dec 2007 16:32:28 +0100 Subject: r26254: Add check for PPC statfs.h to workaround for broken capability.h. Synced from Samba3. Michael (This used to be commit dfdfac2b57ecbca8bddece846f5c2103a518e34d) --- source4/lib/replace/system/capability.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/capability.h b/source4/lib/replace/system/capability.h index 4fe7c8d51b..59b5845721 100644 --- a/source4/lib/replace/system/capability.h +++ b/source4/lib/replace/system/capability.h @@ -27,14 +27,16 @@ #ifdef HAVE_SYS_CAPABILITY_H -#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H) +#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H) && !defined(_PPC_STATFS_H) #define _I386_STATFS_H +#define _PPC_STATFS_H #define BROKEN_REDHAT_7_STATFS_WORKAROUND #endif #include #ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND +#undef _PPC_STATFS_H #undef _I386_STATFS_H #undef BROKEN_REDHAT_7_STATFS_WORKAROUND #endif -- cgit From cbdad76b0d6b893a26c5dc20def034149fb3aa97 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 3 Dec 2007 16:46:45 +0100 Subject: r26255: Work around another broken aspect of sys/capability.h on RHEL5. This is synced from samba3 v3-2-test/11bcdf780e164659b89: The /usr/include/sys/capability.h defines _LINUX_TYPES_H which prevents /usr/include/linux/types.h from being parsed (when included afterwards). Thus certain types are undefined that are for instance needed in /usr/include/linux/dqblk_xfs.h. This breaks the build of lib/sysquotas_xfs.c in Samba3. This commit adds a configure check and a workaround for this. Michael (This used to be commit df3e151992f0b942554034dd143ab8d7f0d7a75b) --- source4/lib/replace/system/capability.h | 9 +++++++++ source4/lib/replace/system/config.m4 | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/capability.h b/source4/lib/replace/system/capability.h index 59b5845721..a7b78f0275 100644 --- a/source4/lib/replace/system/capability.h +++ b/source4/lib/replace/system/capability.h @@ -33,8 +33,17 @@ #define BROKEN_REDHAT_7_STATFS_WORKAROUND #endif +#if defined(BROKEN_RHEL5_SYS_CAP_HEADER) && !defined(_LINUX_TYPES_H) +#define BROKEN_RHEL5_SYS_CAP_HEADER_WORKAROUND +#endif + #include +#ifdef BROKEN_RHEL5_SYS_CAP_HEADER_WORKAROUND +#undef _LINUX_TYPES_H +#undef BROKEN_RHEL5_SYS_CAP_HEADER_WORKAROUND +#endif + #ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND #undef _PPC_STATFS_H #undef _I386_STATFS_H diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4 index 64143fe371..799187af7d 100644 --- a/source4/lib/replace/system/config.m4 +++ b/source4/lib/replace/system/config.m4 @@ -35,6 +35,22 @@ AC_TRY_COMPILE([ if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files]) fi + +AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[ +AC_TRY_COMPILE([ + #ifdef HAVE_SYS_CAPABILITY_H + #include + #endif + #include + ],[ + __s8 i; + ], + samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no, + samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes +)]) +if test x"$samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then + AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h]) +fi ;; esac -- cgit From be4decb2b73e3431155663c2dae3a8452ecde28a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 16 Dec 2007 02:39:01 +0100 Subject: r26467: Use getifaddrs() for interface enumeration and provide replacements for platforms that don't have it in lib/replace. (This used to be commit 9b4924fbd8619033c55b4c6e2589da247332e7db) --- source4/lib/replace/system/network.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index d3ae2bf398..45d84e0386 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -6,6 +6,7 @@ networking system include wrappers Copyright (C) Andrew Tridgell 2004 + Copyright (C) Jelmer Vernooij 2007 ** NOTE! The following LGPL license applies to the replace ** library. This does NOT imply that all of Samba is released @@ -93,6 +94,30 @@ int rep_inet_pton(int af, const char *src, void *dst); const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif +#ifdef HAVE_IFADDRS_H +#include +#endif + +#ifndef HAVE_STRUCT_IFADDRS +struct ifaddrs { + struct ifaddrs *ifa_next; /* Pointer to next struct */ + char *ifa_name; /* Interface name */ + u_int ifa_flags; /* Interface flags */ + struct sockaddr *ifa_addr; /* Interface address */ + struct sockaddr *ifa_netmask; /* Interface netmask */ + struct sockaddr *ifa_dstaddr; /* P2P interface destination */ + void *ifa_data; /* Address specific data */ +}; +#endif + +#ifndef HAVE_GETIFADDRS +int rep_getifaddrs(struct ifaddrs **); +#endif + +#ifndef HAVE_FREEIFADDRS +int rep_freeifaddrs(struct ifaddrs **); +#endif + /* * Some systems have getaddrinfo but not the * defines needed to use it. -- cgit From 958864ccdf6062808433fc032577e7b175f027e0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 16 Dec 2007 03:22:13 +0100 Subject: r26469: Fix paths, only include IPv4 addresses for now. (This used to be commit fa9e3b6fa871b7541878f836ea54e882e614a3cf) --- source4/lib/replace/system/network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 45d84e0386..b8228687e3 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -102,7 +102,7 @@ const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); struct ifaddrs { struct ifaddrs *ifa_next; /* Pointer to next struct */ char *ifa_name; /* Interface name */ - u_int ifa_flags; /* Interface flags */ + unsigned int ifa_flags; /* Interface flags */ struct sockaddr *ifa_addr; /* Interface address */ struct sockaddr *ifa_netmask; /* Interface netmask */ struct sockaddr *ifa_dstaddr; /* P2P interface destination */ -- cgit From af3c0b932402b5eb07121d1ea30570fe5b9d171c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 17 Dec 2007 06:57:30 +0100 Subject: r26492: Some hosts have a define called ifa_dstaddr. (This used to be commit c4cd935ee783b2f4939e2c481bbdb1bbdb9190cd) --- source4/lib/replace/system/network.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index b8228687e3..c340cca657 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -105,6 +105,7 @@ struct ifaddrs { unsigned int ifa_flags; /* Interface flags */ struct sockaddr *ifa_addr; /* Interface address */ struct sockaddr *ifa_netmask; /* Interface netmask */ +#undef ifa_dstaddr struct sockaddr *ifa_dstaddr; /* P2P interface destination */ void *ifa_data; /* Address specific data */ }; -- cgit From 83655ec0dd58c21cdb99d5e7c8008b4b3087449b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 17 Dec 2007 08:20:29 +0100 Subject: r26497: Fix return type for freeifaddrs(). (This used to be commit 8c65053f51330bb55a81572264eefbcc56029dc1) --- source4/lib/replace/system/network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index c340cca657..853c2a38bb 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -116,7 +116,7 @@ int rep_getifaddrs(struct ifaddrs **); #endif #ifndef HAVE_FREEIFADDRS -int rep_freeifaddrs(struct ifaddrs **); +void rep_freeifaddrs(struct ifaddrs **); #endif /* -- cgit From 89f34bb2133a125b1ddffbda30703bf7c551fb55 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 17 Dec 2007 12:27:59 +0100 Subject: r26507: Fix function signature for freeifaddrs. (This used to be commit cc873bdd2e86e5b380c3056810ccc5ad98372f7c) --- source4/lib/replace/system/network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 853c2a38bb..f72b233712 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -116,7 +116,7 @@ int rep_getifaddrs(struct ifaddrs **); #endif #ifndef HAVE_FREEIFADDRS -void rep_freeifaddrs(struct ifaddrs **); +void rep_freeifaddrs(struct ifaddrs *); #endif /* -- cgit From 6afef7d624fbf734d93ebfe95689a282b202aa3c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 20 Dec 2007 15:59:39 +0100 Subject: r26550: libreplace: fallback to __ss_family of struct sockaddr_storage metze (This used to be commit 11bdc9bed80b9842ac1ab8f22509a5d191cddc91) --- source4/lib/replace/system/network.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index f72b233712..e2fad5f686 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -249,9 +249,18 @@ typedef unsigned short int sa_family_t; #ifdef HAVE_STRUCT_SOCKADDR_IN6 #define sockaddr_storage sockaddr_in6 #define ss_family sin6_family +#define HAVE_SS_FAMILY 1 #else #define sockaddr_storage sockaddr_in #define ss_family sin_family +#define HAVE_SS_FAMILY 1 +#endif +#endif + +#ifndef HAVE_SS_FAMILY +#ifdef HAVE___SS_FAMILY +#define ss_family __ss_family +#define HAVE_SS_FAMILY 1 #endif #endif -- cgit From 645c6518d75c683865a29d1b8c49247a092399da Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 11 Dec 2007 13:16:35 -0800 Subject: Add patches for bug #4866 from jiri sasek - Sun Microsystems - Prague Czech Republic - slightly modified - Jiri please check ! to allow Solaris to get passwords > 8 chars. Jeremy. (lib/replace part of 657bf8c3479d6192f269e3daef1517e77a9fa9cb metze) (This used to be commit 9f5c443972a09a70de7c8d6695b08c3730484c6c) --- source4/lib/replace/system/passwd.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 36fca7b4f8..cad3197ccb 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/lib/replace/system/passwd.h @@ -68,9 +68,13 @@ #endif #ifdef REPLACE_GETPASS +#if defined(REPLACE_GETPASS_BY_GETPASSPHRASE) +#define getpass(prompt) getpassphrase(prompt) +#else #define getpass(prompt) rep_getpass(prompt) char *rep_getpass(const char *prompt); #endif +#endif #ifndef NGROUPS_MAX #define NGROUPS_MAX 32 /* Guess... */ -- cgit From b1fcae724156c2b25f41264943cf4cec8fe68821 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 17 Dec 2007 10:44:09 -0800 Subject: Fix bug #5121 (unix passwd sync not working on a streams based system). Jeremy. (lib/replace part of 545cd2139cfc9484b733693814d4724d37125942 metze) (This used to be commit 9cff25cce1d39460dbcab006a309bb2984969eed) --- source4/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index e2fad5f686..53bef66d48 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -79,6 +79,10 @@ #include #endif +#ifdef HAVE_STROPTS_H +#include +#endif + #ifdef REPLACE_INET_NTOA /* define is in "replace.h" */ char *rep_inet_ntoa(struct in_addr ip); -- cgit From adbbc8dcc65997d4c2a555f188a980e6622a309d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 22 Jan 2008 12:21:55 +0100 Subject: libreplace: getpwent_r/getgrent_r on IRIX are similar to solaris but use size_t metze (cherry picked from commit 2f460915111066d79f5dc9b4ae4d003918d06852) (This used to be commit d2ac8be28d3aff59eddbdc6189a255a34c10d502) --- source4/lib/replace/system/config.m4 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4 index 799187af7d..1c05733126 100644 --- a/source4/lib/replace/system/config.m4 +++ b/source4/lib/replace/system/config.m4 @@ -73,6 +73,18 @@ AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, #include #include ]) +AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)], + [ + #ifndef HAVE_GETPWENT_R_DECL + #error missing getpwent_r prototype + #endif + return NULL; + ],[ + AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r irix (similar to solaris) function prototype]) + ],[],[ + #include + #include + ]) AC_CHECK_FUNCS(getgrnam_r getgrgid_r getgrent_r) AC_HAVE_DECL(getgrent_r, [ #include @@ -91,6 +103,19 @@ AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, in #include ]) +AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, size_t buflen)], + [ + #ifndef HAVE_GETGRENT_R_DECL + #error missing getgrent_r prototype + #endif + return NULL; + ],[ + AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r irix (similar to solaris) function prototype]) + ],[],[ + #include + #include + ]) + # locale AC_CHECK_HEADERS(ctype.h locale.h) -- cgit From db2447a7a2b1d39a6849b53f7864e9283daacb6a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 1 Feb 2008 14:23:56 +0100 Subject: NetBSD does not support AI_ADDRCONFIG (cherry picked from commit fb3f7f4046fa195baf5116598772d9016238637f) (This used to be commit e8f3653414c12fb752c096d848dc962008d90439) --- source4/lib/replace/system/network.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 53bef66d48..d09e3f71f8 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -163,8 +163,15 @@ void rep_freeifaddrs(struct ifaddrs *); #endif #ifndef AI_ADDRCONFIG +/* + * logic copied from AI_NUMERICHOST + */ +#if defined(HAVE_STRUCT_ADDRINFO) && defined(HAVE_GETADDRINFO) +#define AI_ADDRCONFIG 0 +#else #define AI_ADDRCONFIG 0x0020 #endif +#endif #ifndef AI_NUMERICSERV /* -- cgit From ab665b0b0553f7909a217373d0690d99bd80d2db Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 20 Feb 2008 12:49:30 +0100 Subject: libreplace: change samba_cv_ to libreplace_cv_ in system/config.m4. Michael (This used to be commit 00c173bfba9c659750bf231fbd9278dd38aa8bfc) --- source4/lib/replace/system/config.m4 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4 index 1c05733126..66c2bd652a 100644 --- a/source4/lib/replace/system/config.m4 +++ b/source4/lib/replace/system/config.m4 @@ -18,7 +18,7 @@ AC_CHECK_HEADERS(sys/capability.h) case "$host_os" in *linux*) -AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[ +AC_CACHE_CHECK([for broken RedHat 7.2 system header files],libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[ AC_TRY_COMPILE([ #ifdef HAVE_SYS_VFS_H #include @@ -29,14 +29,14 @@ AC_TRY_COMPILE([ ],[ int i; ], - samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no, - samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes + libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no, + libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes )]) -if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then +if test x"$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files]) fi -AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[ +AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[ AC_TRY_COMPILE([ #ifdef HAVE_SYS_CAPABILITY_H #include @@ -45,10 +45,10 @@ AC_TRY_COMPILE([ ],[ __s8 i; ], - samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no, - samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes + libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no, + libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes )]) -if test x"$samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then +if test x"$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h]) fi ;; -- cgit From 901addd4a18a9a166fc3518a7bce70969f884e6f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 26 Feb 2008 11:18:51 +0100 Subject: Fix build on VOS: socklen_t is needed for rep_inet_ntop: move it up. Michael (This used to be commit 8a26a6e8f11aca5119b15e304213548ad608dc5b) --- source4/lib/replace/system/network.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index d09e3f71f8..a84b22e5d0 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -83,6 +83,11 @@ #include #endif +#ifndef HAVE_SOCKLEN_T +#define HAVE_SOCKLEN_T +typedef int socklen_t; +#endif + #ifdef REPLACE_INET_NTOA /* define is in "replace.h" */ char *rep_inet_ntoa(struct in_addr ip); @@ -245,11 +250,6 @@ void rep_freeifaddrs(struct ifaddrs *); #define HOST_NAME_MAX 256 #endif -#ifndef HAVE_SOCKLEN_T -#define HAVE_SOCKLEN_T -typedef int socklen_t; -#endif - #ifndef HAVE_SA_FAMILY_T #define HAVE_SA_FAMILY_T typedef unsigned short int sa_family_t; -- cgit From 28464179174d2c3d1c1bc124ba9c2519e08a5fc9 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 26 Feb 2008 13:24:54 +0100 Subject: libreplace: Add tests for connect and gethostbyname. Provide dummy replacements when a function isnt found. The functions are also searched for in certain libraries, and variables SOCKET_LIBS and NSL_LIBS are set accordingly. One purpose of this is to fix the getifaddrs tests on systems where e.g. the socket calls require special libs for linking. Michael (This used to be commit 900d17acb95f1becfc46656a12c107336c027ef7) --- source4/lib/replace/system/network.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index a84b22e5d0..410c6d7cca 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -103,6 +103,16 @@ int rep_inet_pton(int af, const char *src, void *dst); const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif +#ifndef HAVE_CONNECT +/* define is in "replace.h" */ +int rep_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen); +#endif + +#ifndef HAVE_GETHOSTBYNAME +/* define is in "replace.h" */ +struct hostent *rep_gethostbyname(const char *name); +#endif + #ifdef HAVE_IFADDRS_H #include #endif -- cgit From fe096dd31336639a478a9f05cb3d790c2c31af47 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 14 Mar 2008 08:49:34 +0100 Subject: libreplace: add an inet_aton() function that calls inet_pton(). inet_aton() is even needed inside libreplace, in the implementation of rep_getaddrinfo(). Michael (This used to be commit bcb2f3a880f8da8f9bedb7a8e61d7d7b533f1919) --- source4/lib/replace/system/network.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 410c6d7cca..8c606c8f2d 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -103,6 +103,11 @@ int rep_inet_pton(int af, const char *src, void *dst); const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif +#ifndef HAVE_INET_ATON +/* define is in "replace.h" */ +int rep_inet_aton(const char *src, struct in_addr *dst); +#endif + #ifndef HAVE_CONNECT /* define is in "replace.h" */ int rep_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen); -- cgit From 87b48a812683794935db950446e9fb1db8e3da48 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 18 Mar 2008 12:16:47 +0100 Subject: libreplace: replace inet_ntoa() when it is missing ...not only replace it when it is broken. This moves the defintion of rep_inet_ntoa from replace.c to inet_ntoa.c and adds configure checks for existence of inet_ntoa(). Checks are moved to an include file of its own. NOTE: The original rep_inet_ntoa in replace.c was wrapped into a "#ifndef WITH_PTHREADS" but the prototype in replace.h and the define in system/network.h were not. I removed that ifndef since the inet_ntoa() function is usually not thread safe anyways, since it returns a pointer to a static buffer. So whoever calls inet_ntoa() should be aware that it is not thread safe anyways. Michael (This used to be commit 974c0c45ad42644348e0b55454715b12158f1028) --- source4/lib/replace/system/network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 8c606c8f2d..7c2377301b 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -88,7 +88,7 @@ typedef int socklen_t; #endif -#ifdef REPLACE_INET_NTOA +#if !defined (HAVE_INET_NTOA) || defined(REPLACE_INET_NTOA) /* define is in "replace.h" */ char *rep_inet_ntoa(struct in_addr ip); #endif -- cgit From 1268be9f88a1716c9b01b10fef0de5428ef65b3c Mon Sep 17 00:00:00 2001 From: "Gerald W. Carter" Date: Thu, 28 Feb 2008 11:58:05 -0600 Subject: Fix macro name (no 's' in ifr_addr). Interface detection on Solaris still failing due to items pointed out here: http://lists.samba.org/archive/samba-technical/2007-November/056701.html (cherry picked from commit 37c87acc9d48c1fb5d4806374ca8e992300db1ff) (This used to be commit 5757d8dfe9e6cf7b662acdf5c3d825f0021822c0) --- source4/lib/replace/system/network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 7c2377301b..f943a7fd87 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -310,7 +310,7 @@ struct addrinfo { /* Needed for some systems that don't define it (Solaris). */ #ifndef ifr_netmask -#define ifr_netmask ifr_addrs +#define ifr_netmask ifr_addr #endif #ifdef SOCKET_WRAPPER -- cgit From 124f82efe13a453a3f5857c1e25584536147c3dc Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 18 Mar 2008 17:20:47 +0100 Subject: libreplace: move rep_socketpair() to its own module. Prototype is now in system/network.h, implementation in socketpair.c, and check in socketpair.m4. Now the last networking function has vanished from replace.c. Michael (This used to be commit 94ac8a25be15b55f66eff96fdddc2fdc71a43b1e) --- source4/lib/replace/system/network.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index f943a7fd87..a5fb813aa1 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -143,6 +143,11 @@ int rep_getifaddrs(struct ifaddrs **); void rep_freeifaddrs(struct ifaddrs *); #endif +#ifndef HAVE_SOCKETPAIR +/* define is in "replace.h" */ +int rep_socketpair(int d, int type, int protocol, int sv[2]); +#endif + /* * Some systems have getaddrinfo but not the * defines needed to use it. -- cgit From f51a79889c769f0a30eef5bd8a486e08c6bbdad2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 6 May 2008 12:38:55 +0200 Subject: libreplace: check how portable utimes() and futimes() are metze (This used to be commit 8798ce3c744025b94973784dcb44d099427ef190) --- source4/lib/replace/system/config.m4 | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4 index 66c2bd652a..ae26bb5590 100644 --- a/source4/lib/replace/system/config.m4 +++ b/source4/lib/replace/system/config.m4 @@ -9,6 +9,7 @@ AC_CHECK_HEADERS(sys/select.h) # time AC_CHECK_HEADERS(sys/time.h utime.h) AC_HEADER_TIME +AC_CHECK_FUNCS(utime utimes futimes) # wait AC_HEADER_SYS_WAIT -- cgit From bbf4ce91462598cee1eebfb94a773194e56a7ff8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 7 May 2008 13:10:31 +0200 Subject: libreplace: always provide utime() and utimes() I'd like to also provide futimes(), but it seems that some systems doesn't support a it at kernel level. If someone knows how to write a portable replacement for futimes() please tell me... metze (This used to be commit a9604fe4a323dccb537cf02ea7594437b4995803) --- source4/lib/replace/system/config.m4 | 2 +- source4/lib/replace/system/time.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4 index ae26bb5590..5c9b53d5c5 100644 --- a/source4/lib/replace/system/config.m4 +++ b/source4/lib/replace/system/config.m4 @@ -9,7 +9,7 @@ AC_CHECK_HEADERS(sys/select.h) # time AC_CHECK_HEADERS(sys/time.h utime.h) AC_HEADER_TIME -AC_CHECK_FUNCS(utime utimes futimes) +AC_CHECK_FUNCS(utime utimes) # wait AC_HEADER_SYS_WAIT diff --git a/source4/lib/replace/system/time.h b/source4/lib/replace/system/time.h index 036812ab8f..4abf295d1a 100644 --- a/source4/lib/replace/system/time.h +++ b/source4/lib/replace/system/time.h @@ -39,6 +39,11 @@ #ifdef HAVE_UTIME_H #include +#else +struct utimbuf { + time_t actime; /* access time */ + time_t modtime; /* modification time */ +}; #endif #ifndef HAVE_MKTIME @@ -51,4 +56,14 @@ time_t rep_mktime(struct tm *t); time_t rep_timegm(struct tm *tm); #endif +#ifndef HAVE_UTIME +/* define is in "replace.h" */ +int rep_utime(const char *filename, const struct utimbuf *buf); +#endif + +#ifndef HAVE_UTIMES +/* define is in "replace.h" */ +int rep_utimes(const char *filename, const struct timeval tv[2]); +#endif + #endif -- cgit From dd01174d092eec9bb3bb6b680786f8b9f3b4668f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 8 May 2008 10:39:41 +0200 Subject: libreplace: make sure system/network.h is only used when AC_LIBREPLACE_NETWORK_CHECKS was used metze (This used to be commit 3fddd36e119f73a5021370450f9687ef9d252bab) --- source4/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index a5fb813aa1..077892a54e 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -27,6 +27,10 @@ */ +#ifndef LIBREPLACE_NETWORK_CHECKS +#error "AC_LIBREPLACE_NETWORK_CHECKS missing in configure" +#endif + #ifdef HAVE_SYS_SOCKET_H #include #endif -- cgit From 5fd1c5445b16cbe4927aaae60a099dde597ef7b4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 1 Aug 2008 19:30:16 +0200 Subject: libreplace: include and and no heimdal specific headers metze (This used to be commit cffed8e19e22a1fa7b7a322b153df5d54e4c3be2) --- source4/lib/replace/system/kerberos.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/lib/replace/system') diff --git a/source4/lib/replace/system/kerberos.h b/source4/lib/replace/system/kerberos.h index 78aa7b943f..2981024bee 100644 --- a/source4/lib/replace/system/kerberos.h +++ b/source4/lib/replace/system/kerberos.h @@ -129,8 +129,9 @@ /* Whether krb5_princ_realm returns krb5_realm or krb5_data */ #define KRB5_PRINC_REALM_RETURNS_REALM 1 -#include "heimdal/lib/krb5/krb5.h" -#include "heimdal/lib/com_err/com_err.h" +#include +#include + #endif #endif -- cgit