From 8f153c6128dd15fb132d8ddb1752e793bd6a5985 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 18 Sep 2006 22:49:20 +0000 Subject: r18644: bring in libreplace in lib/replace metze (This used to be commit 596cbe73dd268742acf456fccd8a234376fb0c97) --- source3/lib/replace/system/README | 4 + source3/lib/replace/system/capability.h | 41 ++++++++ source3/lib/replace/system/config.m4 | 31 ++++++ source3/lib/replace/system/dir.h | 64 ++++++++++++ source3/lib/replace/system/filesys.h | 170 ++++++++++++++++++++++++++++++++ source3/lib/replace/system/glob.h | 33 +++++++ source3/lib/replace/system/iconv.h | 40 ++++++++ source3/lib/replace/system/kerberos.h | 133 +++++++++++++++++++++++++ source3/lib/replace/system/locale.h | 34 +++++++ source3/lib/replace/system/network.h | 105 ++++++++++++++++++++ source3/lib/replace/system/passwd.h | 91 +++++++++++++++++ source3/lib/replace/system/printing.h | 46 +++++++++ source3/lib/replace/system/readline.h | 48 +++++++++ source3/lib/replace/system/select.h | 42 ++++++++ source3/lib/replace/system/shmem.h | 55 +++++++++++ source3/lib/replace/system/syslog.h | 66 +++++++++++++ source3/lib/replace/system/terminal.h | 42 ++++++++ source3/lib/replace/system/time.h | 40 ++++++++ source3/lib/replace/system/wait.h | 39 ++++++++ 19 files changed, 1124 insertions(+) create mode 100644 source3/lib/replace/system/README create mode 100644 source3/lib/replace/system/capability.h create mode 100644 source3/lib/replace/system/config.m4 create mode 100644 source3/lib/replace/system/dir.h create mode 100644 source3/lib/replace/system/filesys.h create mode 100644 source3/lib/replace/system/glob.h create mode 100644 source3/lib/replace/system/iconv.h create mode 100644 source3/lib/replace/system/kerberos.h create mode 100644 source3/lib/replace/system/locale.h create mode 100644 source3/lib/replace/system/network.h create mode 100644 source3/lib/replace/system/passwd.h create mode 100644 source3/lib/replace/system/printing.h create mode 100644 source3/lib/replace/system/readline.h create mode 100644 source3/lib/replace/system/select.h create mode 100644 source3/lib/replace/system/shmem.h create mode 100644 source3/lib/replace/system/syslog.h create mode 100644 source3/lib/replace/system/terminal.h create mode 100644 source3/lib/replace/system/time.h create mode 100644 source3/lib/replace/system/wait.h (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/README b/source3/lib/replace/system/README new file mode 100644 index 0000000000..69a2b80b56 --- /dev/null +++ b/source3/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/source3/lib/replace/system/capability.h b/source3/lib/replace/system/capability.h new file mode 100644 index 0000000000..6ed8ae8de0 --- /dev/null +++ b/source3/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/source3/lib/replace/system/config.m4 b/source3/lib/replace/system/config.m4 new file mode 100644 index 0000000000..4d66317a5e --- /dev/null +++ b/source3/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/source3/lib/replace/system/dir.h b/source3/lib/replace/system/dir.h new file mode 100644 index 0000000000..64e413c907 --- /dev/null +++ b/source3/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/source3/lib/replace/system/filesys.h b/source3/lib/replace/system/filesys.h new file mode 100644 index 0000000000..1e48f7ab40 --- /dev/null +++ b/source3/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/source3/lib/replace/system/glob.h b/source3/lib/replace/system/glob.h new file mode 100644 index 0000000000..0e51f397c6 --- /dev/null +++ b/source3/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/source3/lib/replace/system/iconv.h b/source3/lib/replace/system/iconv.h new file mode 100644 index 0000000000..75ee1d83ba --- /dev/null +++ b/source3/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/source3/lib/replace/system/kerberos.h b/source3/lib/replace/system/kerberos.h new file mode 100644 index 0000000000..b24196fc25 --- /dev/null +++ b/source3/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/source3/lib/replace/system/locale.h b/source3/lib/replace/system/locale.h new file mode 100644 index 0000000000..82b179dc5b --- /dev/null +++ b/source3/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/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h new file mode 100644 index 0000000000..615fcab5c8 --- /dev/null +++ b/source3/lib/replace/system/network.h @@ -0,0 +1,105 @@ +#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 +#ifndef SOCKET_WRAPPER_NOT_REPLACE +#define SOCKET_WRAPPER_REPLACE +#endif +#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/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h new file mode 100644 index 0000000000..21f31f0388 --- /dev/null +++ b/source3/lib/replace/system/passwd.h @@ -0,0 +1,91 @@ +#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 + +#endif diff --git a/source3/lib/replace/system/printing.h b/source3/lib/replace/system/printing.h new file mode 100644 index 0000000000..489ccb1da8 --- /dev/null +++ b/source3/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/source3/lib/replace/system/readline.h b/source3/lib/replace/system/readline.h new file mode 100644 index 0000000000..4a64ef1376 --- /dev/null +++ b/source3/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/source3/lib/replace/system/select.h b/source3/lib/replace/system/select.h new file mode 100644 index 0000000000..0d1eabbc35 --- /dev/null +++ b/source3/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/source3/lib/replace/system/shmem.h b/source3/lib/replace/system/shmem.h new file mode 100644 index 0000000000..26fa7c8d43 --- /dev/null +++ b/source3/lib/replace/system/shmem.h @@ -0,0 +1,55 @@ +#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 + +#ifndef MAP_FAILED +#define MAP_FAILED ((void *)-1) +#endif + +#endif diff --git a/source3/lib/replace/system/syslog.h b/source3/lib/replace/system/syslog.h new file mode 100644 index 0000000000..e123830a70 --- /dev/null +++ b/source3/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/source3/lib/replace/system/terminal.h b/source3/lib/replace/system/terminal.h new file mode 100644 index 0000000000..94d6b5cc98 --- /dev/null +++ b/source3/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/source3/lib/replace/system/time.h b/source3/lib/replace/system/time.h new file mode 100644 index 0000000000..e7c88f133d --- /dev/null +++ b/source3/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/source3/lib/replace/system/wait.h b/source3/lib/replace/system/wait.h new file mode 100644 index 0000000000..c2041a5938 --- /dev/null +++ b/source3/lib/replace/system/wait.h @@ -0,0 +1,39 @@ +#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 + +#include + +#ifndef SIGCLD +#define SIGCLD SIGCHLD +#endif + +#ifndef SIGNAL_CAST +#define SIGNAL_CAST (RETSIGTYPE (*)(int)) +#endif + +#endif -- cgit From 3fe99c960f7c99e421d000f3c29114b94c182ca8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Sep 2006 02:03:15 +0000 Subject: r18669: fix the samba3 build... we need to move the iconv configure checks to libreplace... metze (This used to be commit 6b53ed8fdc2a4c0b3b24e22ada90d14d60cc93fb) --- source3/lib/replace/system/iconv.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/iconv.h b/source3/lib/replace/system/iconv.h index 75ee1d83ba..fcd3199680 100644 --- a/source3/lib/replace/system/iconv.h +++ b/source3/lib/replace/system/iconv.h @@ -23,12 +23,15 @@ */ #ifdef HAVE_NATIVE_ICONV -#ifdef HAVE_ICONV_H +#ifdef HAVE_ICONV #include #endif -#ifdef HAVE_GICONV_H +#ifdef HAVE_GICONV #include #endif +#ifdef HAVE_BICONV +#include +#endif #endif /* needed for some systems without iconv. Doesn't really matter -- cgit From cb99b612f874bd1d88e50ff1f2c0331cd56e72ca Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 27 Sep 2006 12:43:51 +0000 Subject: r18953: sync socket_wrapper with samba4 metze (This used to be commit 77b0af43f0f7e52b9040a1d3edfb556a232e64f1) --- source3/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 615fcab5c8..a21f8e2eaf 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 6aed2cd44e33cb10f52a41acd06c99d8b23df501 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 27 Sep 2006 14:18:08 +0000 Subject: r18958: merge from samba4: 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 d8275347606cd183caea69837fd765b96d4bab71) --- source3/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index a21f8e2eaf..5e648dcd15 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 1b80624c57cdd71a2f421ebe399416580d8d87b9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 6 Oct 2006 10:58:39 +0000 Subject: r19121: try to get rid of the difference between in system/iconv.h between samba 3 and 4. metze (This used to be commit 04031a9fca037ad77cca0ba0da6801d5017521ba) --- source3/lib/replace/system/iconv.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/iconv.h b/source3/lib/replace/system/iconv.h index fcd3199680..abc2d6f4e1 100644 --- a/source3/lib/replace/system/iconv.h +++ b/source3/lib/replace/system/iconv.h @@ -22,17 +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 +#if defined(HAVE_ICONV) #include -#endif -#ifdef HAVE_GICONV +#elif defined(HAVE_GICONV) #include -#endif -#ifdef HAVE_BICONV +#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 ed34ffb14792cc47ca1af5ffeb076f3c2d7f28dc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 29 Nov 2006 23:20:22 +0000 Subject: r19957: Initial framework to make winbindd robust against tdb corruption. Needs fleshing out (and I forgot one record type) and needs helpful suggestion from Volker to validate freelist, but should give an idea of how this will look. Jeremy. (This used to be commit 8eb53f74e414483afde7b1e38ea2a3f56ae3ec66) --- source3/lib/replace/system/wait.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/wait.h b/source3/lib/replace/system/wait.h index c2041a5938..47e3e84bb1 100644 --- a/source3/lib/replace/system/wait.h +++ b/source3/lib/replace/system/wait.h @@ -36,4 +36,6 @@ #define SIGNAL_CAST (RETSIGTYPE (*)(int)) #endif +#include + #endif -- cgit From f428e045c31a27a1672fcbcaea0c6f99bbd4a84f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Jan 2007 07:17:02 +0000 Subject: r20789: merge from samba4: - remove the epoll configure checks from libreplace metze (This used to be commit 3061c333eca4aaff6af4b200cfe07d17f87018b2) --- source3/lib/replace/system/select.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/select.h b/source3/lib/replace/system/select.h index 0d1eabbc35..20346259c2 100644 --- a/source3/lib/replace/system/select.h +++ b/source3/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 2f66beb8adf679ed1e2e36f9c808c43f095e23cf Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Jan 2007 19:10:54 +0000 Subject: r20817: sync lib/replace with samba4 metze (This used to be commit 352ee730308bbc151a742938818c9b8b3a6e8014) --- source3/lib/replace/system/aio.h | 29 +++++++++++++++++++++++++++++ source3/lib/replace/system/kerberos.h | 1 - source3/lib/replace/system/wait.h | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 source3/lib/replace/system/aio.h (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/aio.h b/source3/lib/replace/system/aio.h new file mode 100644 index 0000000000..e1b9d836e7 --- /dev/null +++ b/source3/lib/replace/system/aio.h @@ -0,0 +1,29 @@ +#ifndef _system_aio_h +#define _system_aio_h +/* + Unix SMB/CIFS implementation. + + AIO system include wrappers + + 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. + + 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_LIBAIO_H +#include +#endif + +#endif diff --git a/source3/lib/replace/system/kerberos.h b/source3/lib/replace/system/kerberos.h index b24196fc25..1617b96aad 100644 --- a/source3/lib/replace/system/kerberos.h +++ b/source3/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 diff --git a/source3/lib/replace/system/wait.h b/source3/lib/replace/system/wait.h index 47e3e84bb1..3855f7ae72 100644 --- a/source3/lib/replace/system/wait.h +++ b/source3/lib/replace/system/wait.h @@ -36,6 +36,8 @@ #define SIGNAL_CAST (RETSIGTYPE (*)(int)) #endif +#ifdef HAVE_SETJMP_H #include +#endif #endif -- cgit From 14ddce8b64b559e0db25e2b79dd16d8f3d9aff26 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Jan 2007 19:28:02 +0000 Subject: r20820: merge from samba4: - include system/aio.h - use full prototype for main - use ifdef instead if metze (This used to be commit 024dd7d7c95bcf8d77914dc2063f16220358e690) --- source3/lib/replace/system/aio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/aio.h b/source3/lib/replace/system/aio.h index e1b9d836e7..45154ccb27 100644 --- a/source3/lib/replace/system/aio.h +++ b/source3/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 c542e154c2e4300d6d6b1c6ed5d5bd651d7aa5f9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 22 Mar 2007 17:35:34 +0000 Subject: r21931: include acl/libacl.h is present I'm not sure if this should go into 3.0.25... it fixes a compiler warning about a missing acl_get_perm() prototype metze (This used to be commit 4b67f94c6a148d6fecaa90d66ce6893b5feb370a) --- source3/lib/replace/system/filesys.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/filesys.h b/source3/lib/replace/system/filesys.h index 1e48f7ab40..ae36d17a0a 100644 --- a/source3/lib/replace/system/filesys.h +++ b/source3/lib/replace/system/filesys.h @@ -41,6 +41,10 @@ #include #endif +#ifdef HAVE_SYS_ACL_H +#include +#endif + #ifdef HAVE_SYS_FS_S5PARAM_H #include #endif -- cgit From 035bb5cc6ff4645bf2fd52785a3b31c3319eaa08 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 22 Mar 2007 18:16:36 +0000 Subject: r21934: fix the build sorry metze (This used to be commit 184c4619773f786c5299499e121e485b7545764f) --- source3/lib/replace/system/filesys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/filesys.h b/source3/lib/replace/system/filesys.h index ae36d17a0a..3b68abe48a 100644 --- a/source3/lib/replace/system/filesys.h +++ b/source3/lib/replace/system/filesys.h @@ -41,7 +41,7 @@ #include #endif -#ifdef HAVE_SYS_ACL_H +#ifdef HAVE_ACL_LIBACL_H #include #endif -- cgit From 6685e533854fe603043e219a4a91fbf779cde1dd Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 23 Mar 2007 10:30:51 +0000 Subject: r21944: move acl header checks to the correct place only jeremy: please merge this to 3.0.25:-) metze (This used to be commit 874164e365b77947d5c514b2a77c6aae0f42599e) --- source3/lib/replace/system/config.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/config.m4 b/source3/lib/replace/system/config.m4 index 4d66317a5e..74278787e7 100644 --- a/source3/lib/replace/system/config.m4 +++ b/source3/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) -- cgit From 2f1aafa2a7e36298cc1e0e593b30fac1ab278596 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 15 Apr 2007 20:12:09 +0000 Subject: r22221: merge from samba4: - libreplace unsetenv() and strptime() replacements metze (This used to be commit 057c1c04d09b48c713ebc0b334cabcefc02561e9) --- source3/lib/replace/system/wait.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/wait.h b/source3/lib/replace/system/wait.h index 3855f7ae72..179ef0774e 100644 --- a/source3/lib/replace/system/wait.h +++ b/source3/lib/replace/system/wait.h @@ -40,4 +40,8 @@ #include #endif +#ifndef SA_RESETHAND +#define SA_RESETHAND SA_ONESHOT +#endif + #endif -- cgit From e893d7f021d149803aa85e347e0a8acefde210ac Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 2 Jun 2007 09:10:08 +0000 Subject: r23309: sync lib/replace with SAMBA_4_0 metze (This used to be commit 20965d800fcac0c55853fb12cdd36b5836fc7e56) --- source3/lib/replace/system/aio.h | 26 +++++++++++++++----------- source3/lib/replace/system/capability.h | 26 +++++++++++++++----------- source3/lib/replace/system/dir.h | 26 +++++++++++++++----------- source3/lib/replace/system/filesys.h | 31 ++++++++++++++++++++----------- source3/lib/replace/system/glob.h | 27 ++++++++++++++++----------- source3/lib/replace/system/iconv.h | 27 ++++++++++++++++----------- source3/lib/replace/system/kerberos.h | 27 ++++++++++++++++----------- source3/lib/replace/system/locale.h | 27 ++++++++++++++++----------- source3/lib/replace/system/network.h | 27 ++++++++++++++++----------- source3/lib/replace/system/passwd.h | 27 ++++++++++++++++----------- source3/lib/replace/system/printing.h | 27 ++++++++++++++++----------- source3/lib/replace/system/readline.h | 29 +++++++++++++++++------------ source3/lib/replace/system/select.h | 31 ++++++++++++++++++++----------- source3/lib/replace/system/shmem.h | 27 ++++++++++++++++----------- source3/lib/replace/system/syslog.h | 27 ++++++++++++++++----------- source3/lib/replace/system/terminal.h | 27 ++++++++++++++++----------- source3/lib/replace/system/time.h | 29 +++++++++++++++++------------ source3/lib/replace/system/wait.h | 29 +++++++++++++++++------------ 18 files changed, 296 insertions(+), 201 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/aio.h b/source3/lib/replace/system/aio.h index 45154ccb27..624575f619 100644 --- a/source3/lib/replace/system/aio.h +++ b/source3/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/source3/lib/replace/system/capability.h b/source3/lib/replace/system/capability.h index 6ed8ae8de0..23e5969145 100644 --- a/source3/lib/replace/system/capability.h +++ b/source3/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/source3/lib/replace/system/dir.h b/source3/lib/replace/system/dir.h index 64e413c907..01607b384f 100644 --- a/source3/lib/replace/system/dir.h +++ b/source3/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/source3/lib/replace/system/filesys.h b/source3/lib/replace/system/filesys.h index 3b68abe48a..b3c339a144 100644 --- a/source3/lib/replace/system/filesys.h +++ b/source3/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 @@ -33,6 +38,10 @@ #include #endif +#ifdef HAVE_MNTENT_H +#include +#endif + #ifdef HAVE_SYS_VFS_H #include #endif diff --git a/source3/lib/replace/system/glob.h b/source3/lib/replace/system/glob.h index 0e51f397c6..ea546ff7f7 100644 --- a/source3/lib/replace/system/glob.h +++ b/source3/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/source3/lib/replace/system/iconv.h b/source3/lib/replace/system/iconv.h index abc2d6f4e1..2b2832a796 100644 --- a/source3/lib/replace/system/iconv.h +++ b/source3/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/source3/lib/replace/system/kerberos.h b/source3/lib/replace/system/kerberos.h index 1617b96aad..8a849c4fb6 100644 --- a/source3/lib/replace/system/kerberos.h +++ b/source3/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/source3/lib/replace/system/locale.h b/source3/lib/replace/system/locale.h index 82b179dc5b..aa1e1e619e 100644 --- a/source3/lib/replace/system/locale.h +++ b/source3/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/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 5e648dcd15..64c7cd3399 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 21f31f0388..d51914eb50 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/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/source3/lib/replace/system/printing.h b/source3/lib/replace/system/printing.h index 489ccb1da8..3054811453 100644 --- a/source3/lib/replace/system/printing.h +++ b/source3/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/source3/lib/replace/system/readline.h b/source3/lib/replace/system/readline.h index 4a64ef1376..3a253058e2 100644 --- a/source3/lib/replace/system/readline.h +++ b/source3/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/source3/lib/replace/system/select.h b/source3/lib/replace/system/select.h index 20346259c2..a196f9c478 100644 --- a/source3/lib/replace/system/select.h +++ b/source3/lib/replace/system/select.h @@ -7,25 +7,34 @@ 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 #include #endif +#ifdef HAVE_SYS_EPOLL_H +#include +#endif + #ifndef SELECT_CAST #define SELECT_CAST #endif diff --git a/source3/lib/replace/system/shmem.h b/source3/lib/replace/system/shmem.h index 26fa7c8d43..234ec1c14a 100644 --- a/source3/lib/replace/system/shmem.h +++ b/source3/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/source3/lib/replace/system/syslog.h b/source3/lib/replace/system/syslog.h index e123830a70..f949c7a8d9 100644 --- a/source3/lib/replace/system/syslog.h +++ b/source3/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/source3/lib/replace/system/terminal.h b/source3/lib/replace/system/terminal.h index 94d6b5cc98..292c85ab6f 100644 --- a/source3/lib/replace/system/terminal.h +++ b/source3/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/source3/lib/replace/system/time.h b/source3/lib/replace/system/time.h index e7c88f133d..a0924f4051 100644 --- a/source3/lib/replace/system/time.h +++ b/source3/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/source3/lib/replace/system/wait.h b/source3/lib/replace/system/wait.h index 179ef0774e..96b5c2cb80 100644 --- a/source3/lib/replace/system/wait.h +++ b/source3/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 2c09988e46d4e917b1c53c9bda3f81a48bba4952 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 01:44:42 +0000 Subject: r23790: LGPLv3+ conversion for our LGPLv2+ library code (This used to be commit 1b78cace504f60c0f525765fbf59d9cc6506cd4d) --- source3/lib/replace/system/aio.h | 2 +- source3/lib/replace/system/capability.h | 2 +- source3/lib/replace/system/dir.h | 2 +- source3/lib/replace/system/filesys.h | 2 +- source3/lib/replace/system/glob.h | 2 +- source3/lib/replace/system/iconv.h | 2 +- source3/lib/replace/system/kerberos.h | 2 +- source3/lib/replace/system/locale.h | 2 +- source3/lib/replace/system/network.h | 2 +- source3/lib/replace/system/passwd.h | 2 +- source3/lib/replace/system/printing.h | 2 +- source3/lib/replace/system/readline.h | 2 +- source3/lib/replace/system/select.h | 2 +- source3/lib/replace/system/shmem.h | 2 +- source3/lib/replace/system/syslog.h | 2 +- source3/lib/replace/system/terminal.h | 2 +- source3/lib/replace/system/time.h | 2 +- source3/lib/replace/system/wait.h | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/aio.h b/source3/lib/replace/system/aio.h index 624575f619..8bc4fdfd42 100644 --- a/source3/lib/replace/system/aio.h +++ b/source3/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/source3/lib/replace/system/capability.h b/source3/lib/replace/system/capability.h index 23e5969145..c2048d3946 100644 --- a/source3/lib/replace/system/capability.h +++ b/source3/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/source3/lib/replace/system/dir.h b/source3/lib/replace/system/dir.h index 01607b384f..d6829c3f19 100644 --- a/source3/lib/replace/system/dir.h +++ b/source3/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/source3/lib/replace/system/filesys.h b/source3/lib/replace/system/filesys.h index b3c339a144..aa86a9f58f 100644 --- a/source3/lib/replace/system/filesys.h +++ b/source3/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/source3/lib/replace/system/glob.h b/source3/lib/replace/system/glob.h index ea546ff7f7..c05e9f64f7 100644 --- a/source3/lib/replace/system/glob.h +++ b/source3/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/source3/lib/replace/system/iconv.h b/source3/lib/replace/system/iconv.h index 2b2832a796..a7299799d1 100644 --- a/source3/lib/replace/system/iconv.h +++ b/source3/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/source3/lib/replace/system/kerberos.h b/source3/lib/replace/system/kerberos.h index 8a849c4fb6..685d2e9462 100644 --- a/source3/lib/replace/system/kerberos.h +++ b/source3/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/source3/lib/replace/system/locale.h b/source3/lib/replace/system/locale.h index aa1e1e619e..9b47cb1ef4 100644 --- a/source3/lib/replace/system/locale.h +++ b/source3/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/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 64c7cd3399..4594f2237d 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index d51914eb50..6820d05b97 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/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/source3/lib/replace/system/printing.h b/source3/lib/replace/system/printing.h index 3054811453..cccd6b0e62 100644 --- a/source3/lib/replace/system/printing.h +++ b/source3/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/source3/lib/replace/system/readline.h b/source3/lib/replace/system/readline.h index 3a253058e2..0dbdd70618 100644 --- a/source3/lib/replace/system/readline.h +++ b/source3/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/source3/lib/replace/system/select.h b/source3/lib/replace/system/select.h index a196f9c478..635b725d79 100644 --- a/source3/lib/replace/system/select.h +++ b/source3/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/source3/lib/replace/system/shmem.h b/source3/lib/replace/system/shmem.h index 234ec1c14a..80b4b65f44 100644 --- a/source3/lib/replace/system/shmem.h +++ b/source3/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/source3/lib/replace/system/syslog.h b/source3/lib/replace/system/syslog.h index f949c7a8d9..fd7214f73d 100644 --- a/source3/lib/replace/system/syslog.h +++ b/source3/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/source3/lib/replace/system/terminal.h b/source3/lib/replace/system/terminal.h index 292c85ab6f..56f6aedeff 100644 --- a/source3/lib/replace/system/terminal.h +++ b/source3/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/source3/lib/replace/system/time.h b/source3/lib/replace/system/time.h index a0924f4051..d3dc6da4ad 100644 --- a/source3/lib/replace/system/time.h +++ b/source3/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/source3/lib/replace/system/wait.h b/source3/lib/replace/system/wait.h index 96b5c2cb80..8b2daa9ffc 100644 --- a/source3/lib/replace/system/wait.h +++ b/source3/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 9fa1c63578733077c0aaaeeb2fc97c3b191089cc 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 c676a971142d7176fd5dbf21405fca14515a0a76) --- source3/lib/replace/system/aio.h | 3 +-- source3/lib/replace/system/capability.h | 3 +-- source3/lib/replace/system/dir.h | 3 +-- source3/lib/replace/system/filesys.h | 3 +-- source3/lib/replace/system/glob.h | 3 +-- source3/lib/replace/system/iconv.h | 3 +-- source3/lib/replace/system/kerberos.h | 3 +-- source3/lib/replace/system/locale.h | 3 +-- source3/lib/replace/system/network.h | 3 +-- source3/lib/replace/system/passwd.h | 3 +-- source3/lib/replace/system/printing.h | 3 +-- source3/lib/replace/system/readline.h | 3 +-- source3/lib/replace/system/select.h | 3 +-- source3/lib/replace/system/shmem.h | 3 +-- source3/lib/replace/system/syslog.h | 3 +-- source3/lib/replace/system/terminal.h | 3 +-- source3/lib/replace/system/time.h | 3 +-- source3/lib/replace/system/wait.h | 3 +-- 18 files changed, 18 insertions(+), 36 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/aio.h b/source3/lib/replace/system/aio.h index 8bc4fdfd42..784d77fa28 100644 --- a/source3/lib/replace/system/aio.h +++ b/source3/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/source3/lib/replace/system/capability.h b/source3/lib/replace/system/capability.h index c2048d3946..4fe7c8d51b 100644 --- a/source3/lib/replace/system/capability.h +++ b/source3/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/source3/lib/replace/system/dir.h b/source3/lib/replace/system/dir.h index d6829c3f19..dec2d54649 100644 --- a/source3/lib/replace/system/dir.h +++ b/source3/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/source3/lib/replace/system/filesys.h b/source3/lib/replace/system/filesys.h index aa86a9f58f..4bf1f64865 100644 --- a/source3/lib/replace/system/filesys.h +++ b/source3/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/source3/lib/replace/system/glob.h b/source3/lib/replace/system/glob.h index c05e9f64f7..3e23db6828 100644 --- a/source3/lib/replace/system/glob.h +++ b/source3/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/source3/lib/replace/system/iconv.h b/source3/lib/replace/system/iconv.h index a7299799d1..3c8a71f2f7 100644 --- a/source3/lib/replace/system/iconv.h +++ b/source3/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/source3/lib/replace/system/kerberos.h b/source3/lib/replace/system/kerberos.h index 685d2e9462..78aa7b943f 100644 --- a/source3/lib/replace/system/kerberos.h +++ b/source3/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/source3/lib/replace/system/locale.h b/source3/lib/replace/system/locale.h index 9b47cb1ef4..e73a9bb274 100644 --- a/source3/lib/replace/system/locale.h +++ b/source3/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/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 4594f2237d..13d95a8ba7 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 6820d05b97..4e858fc89c 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/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/source3/lib/replace/system/printing.h b/source3/lib/replace/system/printing.h index cccd6b0e62..7eb02d004a 100644 --- a/source3/lib/replace/system/printing.h +++ b/source3/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/source3/lib/replace/system/readline.h b/source3/lib/replace/system/readline.h index 0dbdd70618..ba34dc6a61 100644 --- a/source3/lib/replace/system/readline.h +++ b/source3/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/source3/lib/replace/system/select.h b/source3/lib/replace/system/select.h index 635b725d79..da18de0cfc 100644 --- a/source3/lib/replace/system/select.h +++ b/source3/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/source3/lib/replace/system/shmem.h b/source3/lib/replace/system/shmem.h index 80b4b65f44..64fe39b6cb 100644 --- a/source3/lib/replace/system/shmem.h +++ b/source3/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/source3/lib/replace/system/syslog.h b/source3/lib/replace/system/syslog.h index fd7214f73d..104be1df84 100644 --- a/source3/lib/replace/system/syslog.h +++ b/source3/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/source3/lib/replace/system/terminal.h b/source3/lib/replace/system/terminal.h index 56f6aedeff..9ad601ace0 100644 --- a/source3/lib/replace/system/terminal.h +++ b/source3/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/source3/lib/replace/system/time.h b/source3/lib/replace/system/time.h index d3dc6da4ad..6bbb6b15bb 100644 --- a/source3/lib/replace/system/time.h +++ b/source3/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/source3/lib/replace/system/wait.h b/source3/lib/replace/system/wait.h index 8b2daa9ffc..de94cf09d5 100644 --- a/source3/lib/replace/system/wait.h +++ b/source3/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 68edc3a5c5a3cfeed222a95bbe75dadd41dbb5ea Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 19 Sep 2007 14:57:20 +0000 Subject: r25232: sync lib/replace with SAMBA_4_0 metze (This used to be commit 828d2ca0610ab5ee3b96d187b3432b9b4fea72f8) --- source3/lib/replace/system/network.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 13d95a8ba7..7469040b28 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 3fbd1ae54ced2eb889a8fe0a6ea32dfd8175f941 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 Oct 2007 19:27:25 +0000 Subject: r25472: Fix the interfaces code to detect IPv6 interfaces, using the new standard getifaddrs() and freeifaddrs() interfaces. Currently we only return IPv4 af_families. Needs fixing for binds to IPv6 but this has to be careful work. Jeremy. (This used to be commit 327875182c9219aeba687e10aaea93546d9a70ea) --- source3/lib/replace/system/network.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 7469040b28..70c3ec711c 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -106,4 +106,16 @@ char *rep_inet_ntoa(struct in_addr ip); #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 + #endif -- cgit From c7da0dced68ec12a689effcc9c7351b46a815831 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 Oct 2007 20:04:14 +0000 Subject: r25474: Try and fix the build on Mac OS X 10.4.9. Shuffle sa_family_t around. Jeremy. (This used to be commit f1b8c5de0ae96e04e340029f5cd544de9ac57b32) --- source3/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 70c3ec711c..1b442dd602 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -118,4 +118,8 @@ char *rep_inet_ntoa(struct in_addr ip); #define INET6_ADDRSTRLEN 46 #endif +#ifndef HAVE_SA_FAMILY_T +typedef unsigned short int sa_family_t; +#endif + #endif -- cgit From 334b288831c1730cb88fb431f684b9062e139efd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 3 Oct 2007 19:12:39 +0000 Subject: r25487: Try fix the build - fix socklen_t and sa_family_t. Jeremy. (This used to be commit 2cab82563409eca79ac5f518a3dcb8cdbdcded7e) --- source3/lib/replace/system/network.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 1b442dd602..fc21a3e99a 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -118,8 +118,16 @@ char *rep_inet_ntoa(struct in_addr ip); #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_SOCKADDR_STORAGE +#define sockaddr_storage sockaddr +#endif + #endif -- cgit From 30e4012396b1f73a4ba03034b546af7daed9c87b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 3 Oct 2007 22:01:25 +0000 Subject: r25495: Fixup definitions for missing sockaddr_storage. Jeremy. (This used to be commit d980ee5040f2ab9e7408218d13962dd64e2b33b1) --- source3/lib/replace/system/network.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index fc21a3e99a..d5d2be068e 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -127,7 +127,8 @@ typedef unsigned short int sa_family_t; #endif #ifndef HAVE_SOCKADDR_STORAGE -#define sockaddr_storage sockaddr +#define sockaddr_storage sockaddr_in +#define ss_family sin_family #endif #endif -- cgit From 941544a9514aaae89268bc9d689705ad0724119e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 4 Oct 2007 17:20:49 +0000 Subject: r25505: Add a replacement (IPv4 only) implementation of getaddrinfo/freeaddrinfo under the 2 clause *BSD license for future use in IPv6 code. Original code was from PostgreSQL and I've maintained their license even though I've rewritten large parts of it (I probably should donate this back to them). Jeremy. (This used to be commit 760d993340a966269d71acfb7a6b5e4d3776ac5d) --- source3/lib/replace/system/getaddrinfo.h | 158 +++++++++++++++++++++++++++++++ source3/lib/replace/system/network.h | 6 +- 2 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 source3/lib/replace/system/getaddrinfo.h (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/getaddrinfo.h b/source3/lib/replace/system/getaddrinfo.h new file mode 100644 index 0000000000..ed678bd065 --- /dev/null +++ b/source3/lib/replace/system/getaddrinfo.h @@ -0,0 +1,158 @@ +/* +PostgreSQL Database Management System +(formerly known as Postgres, then as Postgres95) + +Portions Copyright (c) 1996-2005, The PostgreSQL Global Development Group + +Portions Copyright (c) 1994, The Regents of the University of California + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose, without fee, and without a written agreement +is hereby granted, provided that the above copyright notice and this paragraph +and the following two paragraphs appear in all copies. + +IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING +LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, +EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS +ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS +TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +*/ + +/*------------------------------------------------------------------------- + * + * getaddrinfo.h + * Support getaddrinfo() on platforms that don't have it. + * + * Note: we use our own routines on platforms that don't HAVE_STRUCT_ADDRINFO, + * whether or not the library routine getaddrinfo() can be found. This + * policy is needed because on some platforms a manually installed libbind.a + * may provide getaddrinfo(), yet the system headers may not provide the + * struct definitions needed to call it. To avoid conflict with the libbind + * definition in such cases, we rename our routines to pg_xxx() via macros. + * + * This code will also work on platforms where struct addrinfo is defined + * in the system headers but no getaddrinfo() can be located. + * + * Copyright (c) 2003-2007, PostgreSQL Global Development Group + * + *------------------------------------------------------------------------- + */ +#ifndef GETADDRINFO_H +#define GETADDRINFO_H + + +/* 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_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 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 */ + + +#ifndef HAVE_GETADDRINFO + +/* Rename private copies per comments above */ +#ifdef getaddrinfo +#undef getaddrinfo +#endif +#define getaddrinfo pg_getaddrinfo + +#ifdef freeaddrinfo +#undef freeaddrinfo +#endif +#define freeaddrinfo pg_freeaddrinfo + +#ifdef gai_strerror +#undef gai_strerror +#endif +#define gai_strerror pg_gai_strerror + +#ifdef getnameinfo +#undef getnameinfo +#endif +#define getnameinfo pg_getnameinfo + +extern int getaddrinfo(const char *node, const char *service, + const struct addrinfo * hints, struct addrinfo ** res); +extern void freeaddrinfo(struct addrinfo * res); +extern const char *gai_strerror(int errcode); +extern int getnameinfo(const struct sockaddr * sa, socklen_t salen, + char *node, size_t nodelen, + char *service, size_t servicelen, int flags); +#endif /* HAVE_GETADDRINFO */ + +#endif /* GETADDRINFO_H */ diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index d5d2be068e..a09d3bb01b 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -126,9 +126,13 @@ typedef int socklen_t; typedef unsigned short int sa_family_t; #endif -#ifndef HAVE_SOCKADDR_STORAGE +#ifndef HAVE_STRUCT_SOCKADDR_STORAGE #define sockaddr_storage sockaddr_in #define ss_family sin_family #endif +#ifndef HOST_NAME_MAX +#define HOST_NAME_MAX 256 +#endif + #endif -- cgit From b5725f4fecf9ea3dfc999d8c6542dd1ba171f238 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 4 Oct 2007 17:35:12 +0000 Subject: r25507: Fix definition of struct sockaddr_storage if struct sockaddr_in6 is defined. Jeremy. (This used to be commit 4cf17df5caeb2b0220f6a7dd82d5fed5aca56850) --- source3/lib/replace/system/network.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index a09d3bb01b..c2a5dec5af 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -127,9 +127,14 @@ 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 -- cgit From d154a0d74b23b4a1fbd921f17dec3e0e3506eeab Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 6 Oct 2007 23:07:33 +0000 Subject: r25557: merge libreplace fixes from samba4 (This used to be commit 8c1669997c53f0f7bfb9a794083afd01b131f676) --- source3/lib/replace/system/getaddrinfo.h | 158 ------------------------------- 1 file changed, 158 deletions(-) delete mode 100644 source3/lib/replace/system/getaddrinfo.h (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/getaddrinfo.h b/source3/lib/replace/system/getaddrinfo.h deleted file mode 100644 index ed678bd065..0000000000 --- a/source3/lib/replace/system/getaddrinfo.h +++ /dev/null @@ -1,158 +0,0 @@ -/* -PostgreSQL Database Management System -(formerly known as Postgres, then as Postgres95) - -Portions Copyright (c) 1996-2005, The PostgreSQL Global Development Group - -Portions Copyright (c) 1994, The Regents of the University of California - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose, without fee, and without a written agreement -is hereby granted, provided that the above copyright notice and this paragraph -and the following two paragraphs appear in all copies. - -IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR -DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING -LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, -EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS -ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS -TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - -*/ - -/*------------------------------------------------------------------------- - * - * getaddrinfo.h - * Support getaddrinfo() on platforms that don't have it. - * - * Note: we use our own routines on platforms that don't HAVE_STRUCT_ADDRINFO, - * whether or not the library routine getaddrinfo() can be found. This - * policy is needed because on some platforms a manually installed libbind.a - * may provide getaddrinfo(), yet the system headers may not provide the - * struct definitions needed to call it. To avoid conflict with the libbind - * definition in such cases, we rename our routines to pg_xxx() via macros. - * - * This code will also work on platforms where struct addrinfo is defined - * in the system headers but no getaddrinfo() can be located. - * - * Copyright (c) 2003-2007, PostgreSQL Global Development Group - * - *------------------------------------------------------------------------- - */ -#ifndef GETADDRINFO_H -#define GETADDRINFO_H - - -/* 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_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 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 */ - - -#ifndef HAVE_GETADDRINFO - -/* Rename private copies per comments above */ -#ifdef getaddrinfo -#undef getaddrinfo -#endif -#define getaddrinfo pg_getaddrinfo - -#ifdef freeaddrinfo -#undef freeaddrinfo -#endif -#define freeaddrinfo pg_freeaddrinfo - -#ifdef gai_strerror -#undef gai_strerror -#endif -#define gai_strerror pg_gai_strerror - -#ifdef getnameinfo -#undef getnameinfo -#endif -#define getnameinfo pg_getnameinfo - -extern int getaddrinfo(const char *node, const char *service, - const struct addrinfo * hints, struct addrinfo ** res); -extern void freeaddrinfo(struct addrinfo * res); -extern const char *gai_strerror(int errcode); -extern int getnameinfo(const struct sockaddr * sa, socklen_t salen, - char *node, size_t nodelen, - char *service, size_t servicelen, int flags); -#endif /* HAVE_GETADDRINFO */ - -#endif /* GETADDRINFO_H */ -- cgit From e5a951325a6cac8567af3a66de6d2df577508ae4 Mon Sep 17 00:00:00 2001 From: "Gerald (Jerry) Carter" Date: Wed, 10 Oct 2007 15:34:30 -0500 Subject: [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. (This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab) --- source3/lib/replace/system/getaddrinfo.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 source3/lib/replace/system/getaddrinfo.h (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/getaddrinfo.h b/source3/lib/replace/system/getaddrinfo.h new file mode 100644 index 0000000000..e69de29bb2 -- cgit From 81a70d4ac5c3143ff036d8f73979da70132e071e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 10 Oct 2007 17:56:19 -0700 Subject: Merge from metze of libreplace header changes (This used to be commit d39ce8e37ed81f4a34a148f975874989d8d187a1) --- source3/lib/replace/system/time.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/time.h b/source3/lib/replace/system/time.h index 6bbb6b15bb..036812ab8f 100644 --- a/source3/lib/replace/system/time.h +++ b/source3/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 804396dce9112361c0e19ad2e15b9bb8dd23c378 Mon Sep 17 00:00:00 2001 From: metze Date: Wed, 10 Oct 2007 12:09:06 +0000 Subject: 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 git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25602 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit ec8e3f7f92522c65ec472058321db8a7ac30ec4c) --- source3/lib/replace/system/network.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index c2a5dec5af..10e9f66bd9 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -86,8 +86,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 2ecbed36b22e7147462018d9bcbe8e45d85a45c2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Oct 2007 10:59:50 +0200 Subject: missing stuff from samba4's libreplace metze (This used to be commit 0177158d85797e0d22c81d88175a77d4ad5ed711) --- source3/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 10e9f66bd9..0b0dbcb88d 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 c08cd08acc74db1f7b5620ad346131a9d77b0a08 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Oct 2007 15:42:13 +0200 Subject: rename getsmbpass -> rep_getpass and provide the function prototype metze (This used to be commit 96820f8d8f6522fc264efda0f069e2f6a420ac2e) --- source3/lib/replace/system/passwd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 4e858fc89c..53d35e7b87 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/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 cadb72dd997a7e3284a3df93a717a4c1920cf24e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 16 Oct 2007 15:15:23 -0700 Subject: Move #defined for getaddrinfo into network.h (as other defines). Allows RHEL4 compile to work. Jeremy. (This used to be commit 0ffdf4fdeea88c21880c8bf69d8db56fb49effa7) --- source3/lib/replace/system/network.h | 95 ++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 4 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 0b0dbcb88d..61de2b728d 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 fa12678f4ec51329f856731fd371a5799c84c8aa Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 17 Oct 2007 15:21:48 +0200 Subject: delete empty file lib/replace/system/getaddrinfo.h metze (This used to be commit 354bdd38e8714b789daffc897cd843a8d401be45) --- source3/lib/replace/system/getaddrinfo.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 source3/lib/replace/system/getaddrinfo.h (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/getaddrinfo.h b/source3/lib/replace/system/getaddrinfo.h deleted file mode 100644 index e69de29bb2..0000000000 -- cgit From 8cca849769ba44ab9dc5bd875056987e541b92fe Mon Sep 17 00:00:00 2001 From: metze Date: Wed, 24 Oct 2007 12:53:34 +0000 Subject: [libreplace] include socket_wrapper.h after we have typedef'ed socklen_t metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25713 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit f1d434a132e424f2fdce59d51a7c398988c1474d) --- source3/lib/replace/system/network.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 61de2b728d..79fe21405f 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 556513ff72b2ef13654f7a5b3856f7b66a2112b7 Mon Sep 17 00:00:00 2001 From: metze Date: Wed, 24 Oct 2007 12:55:40 +0000 Subject: [libreplace] move define of a constant to near to the others metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25714 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit fa120f7c50d0084e7d887811e5fa59ae3bcfe53e) --- source3/lib/replace/system/network.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 79fe21405f..1ac881e496 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 cd486165e9825864cb73ea8b245195a4d28f1c73 Mon Sep 17 00:00:00 2001 From: metze Date: Wed, 24 Oct 2007 12:57:57 +0000 Subject: [libreplace] move definition of struct addrinfo so that it can use socklen_t metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25715 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 45150075677451b48ce56ebdce96aca1ed13fa80) --- source3/lib/replace/system/network.h | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 1ac881e496..774776dca3 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 800ca5179261af3137d319ad72507e26dc7c7d7f Mon Sep 17 00:00:00 2001 From: metze Date: Wed, 24 Oct 2007 13:01:03 +0000 Subject: [libreplace] if we replace types define the HAVE_ macro this is needed as heimdal's roken.h also tries to replace the types metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25718 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit b81d8bc43cd7167a5cd4b18c26ba3eecf75043eb) --- source3/lib/replace/system/network.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 774776dca3..44a1dcc8e1 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 899f921c722bb99c04598caa227edb4e4a1093e8 Mon Sep 17 00:00:00 2001 From: metze Date: Thu, 25 Oct 2007 06:53:38 +0000 Subject: - 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 git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25724 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit e56977ea459b3615d33237d19ed8e7ad8b509853) --- source3/lib/replace/system/network.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 44a1dcc8e1..5de363f134 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 7c6ed7aa1c95f61a4569f266e42938c6b225944e Mon Sep 17 00:00:00 2001 From: metze Date: Thu, 25 Oct 2007 09:16:11 +0000 Subject: [libreplace] define AI_NUMERICSERV as it's used in getaddrinfo.c metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25728 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 11a977aa0757801fb0fa805b123e7bc75c8be447) --- source3/lib/replace/system/network.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 5de363f134..c7b499a932 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 1870643d20423fcc4df5dc62b1ab75f8a5b2b635 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 25 Oct 2007 15:43:44 -0700 Subject: Try and fix the Solaris build by adding a missing define (from Jerry). Jeremy (This used to be commit a68bbea0d42cc64b9fa731ab2a1da82ef30937c6) --- source3/lib/replace/system/network.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index c7b499a932..d3ae2bf398 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 f16544ad3b167113a352605ffb0f7bb79116eff3 Mon Sep 17 00:00:00 2001 From: metze Date: Mon, 5 Nov 2007 15:45:08 +0000 Subject: libreplace: include nss_wrapper.h if NSS_WRAPPER is defined metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25838 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 809fee4bef66eb8b8687f88257c0d6f77d3b4063) --- source3/lib/replace/system/passwd.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 53d35e7b87..513947c85d 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/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 cfb20163a5a6b8a58778c95e53824dcd68938454 Mon Sep 17 00:00:00 2001 From: metze Date: Tue, 6 Nov 2007 06:54:49 +0000 Subject: libreplace: we need include before nss_wrapper.h metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25863 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 20ec1f472566bbc570fa138cce5dbd0407aef530) --- source3/lib/replace/system/passwd.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 513947c85d..36fca7b4f8 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/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 d8f3c9d0786ff637241d2a9409e1c7c253715ba5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 6 Nov 2007 21:47:57 -0800 Subject: Fix bug where tdb lock call interrupted with an alarm sig would not terminate and could lead to runaway smbd processes. Thanks to Dave Daugherty @ Centrify for pointing this out to us. Jeremy. (This used to be commit ef8da1698371c95495add53df81a978df709c88d) --- source3/lib/replace/system/wait.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/wait.h b/source3/lib/replace/system/wait.h index de94cf09d5..5784b1ae92 100644 --- a/source3/lib/replace/system/wait.h +++ b/source3/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 ca2ced5c2356d3d59ce1539dc655f85f150266d9 Mon Sep 17 00:00:00 2001 From: metze Date: Tue, 6 Nov 2007 07:26:12 +0000 Subject: libreplace: check for nss passwd|group get*_r functions metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25865 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 8e81dd7356eb8422284a93bfc9b55ed1523c8208) --- source3/lib/replace/system/config.m4 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/config.m4 b/source3/lib/replace/system/config.m4 index 74278787e7..2b2f76a8e6 100644 --- a/source3/lib/replace/system/config.m4 +++ b/source3/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 05206ce0c29e1272f4ad9c30af66a62e12316d0c Mon Sep 17 00:00:00 2001 From: metze Date: Tue, 6 Nov 2007 09:15:11 +0000 Subject: libreplace: solaris has different prototypes for getpwent_r and getgrent_r metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25867 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 77900d2ba03455412ad645e757ba468ca90453fb) --- source3/lib/replace/system/config.m4 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/config.m4 b/source3/lib/replace/system/config.m4 index 2b2f76a8e6..6500535982 100644 --- a/source3/lib/replace/system/config.m4 +++ b/source3/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 6028176a392e095d8600e3c27704ee454c152b3f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 16 Nov 2007 00:45:44 +0100 Subject: Fix the build on RHEL5, when libcap-devel is installed. 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. This commit adds a configure check and a workaround for this. Michael (This used to be commit 11bcdf780e164659b89a66e24edc27e89da7619a) --- source3/lib/replace/system/capability.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/capability.h b/source3/lib/replace/system/capability.h index 4fe7c8d51b..b3142371f9 100644 --- a/source3/lib/replace/system/capability.h +++ b/source3/lib/replace/system/capability.h @@ -32,8 +32,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 _I386_STATFS_H #undef BROKEN_REDHAT_7_STATFS_WORKAROUND -- cgit From fc0a63153fec7d56e35f484b80891d1a7e66e35a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 3 Dec 2007 16:42:08 +0100 Subject: Add check for ppc statfs.h header to workaround for broken capabilities.h. Taken from s3:lib/system.c Michael (This used to be commit 07e6cfdc626c2778292e5b0b338a35046c482cf9) --- source3/lib/replace/system/capability.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/capability.h b/source3/lib/replace/system/capability.h index b3142371f9..a7b78f0275 100644 --- a/source3/lib/replace/system/capability.h +++ b/source3/lib/replace/system/capability.h @@ -27,8 +27,9 @@ #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 @@ -44,6 +45,7 @@ #endif #ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND +#undef _PPC_STATFS_H #undef _I386_STATFS_H #undef BROKEN_REDHAT_7_STATFS_WORKAROUND #endif -- cgit From f5b071e3b0c186e5e78b905c5c4c13d3421f6f46 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 3 Dec 2007 16:43:51 +0100 Subject: Move check for broken system capabilites.h headers to lib/replace. Michael (This used to be commit 8ec10c4ab1aa890c9f03d34bd872c93ae5c4d84c) --- source3/lib/replace/system/config.m4 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/config.m4 b/source3/lib/replace/system/config.m4 index 6500535982..0b3baff459 100644 --- a/source3/lib/replace/system/config.m4 +++ b/source3/lib/replace/system/config.m4 @@ -16,6 +16,36 @@ 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 + +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 + # 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 684a72c779c4ff4d00905ff560447a8c6ba723e5 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 3 Dec 2007 16:50:55 +0100 Subject: Reformat configure checks for broken capabilities.h. Michael (This used to be commit 834a16225a8fb905a8f870a17ba67670e622eccc) --- source3/lib/replace/system/config.m4 | 40 +++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 16 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/config.m4 b/source3/lib/replace/system/config.m4 index 0b3baff459..799187af7d 100644 --- a/source3/lib/replace/system/config.m4 +++ b/source3/lib/replace/system/config.m4 @@ -20,28 +20,36 @@ 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)]) + #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]) + 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)]) + #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]) + AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h]) fi ;; esac -- cgit From 95c2f313cef37680fee47b2fc4d1bf15929ad6e7 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. (This used to be commit 657bf8c3479d6192f269e3daef1517e77a9fa9cb) --- source3/lib/replace/system/passwd.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 36fca7b4f8..cad3197ccb 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/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 8f28bda7f8c18de597d345126c9ee03e99776e55 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. (This used to be commit 545cd2139cfc9484b733693814d4724d37125942) --- source3/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index d3ae2bf398..9087c02da1 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -78,6 +78,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 8b88fa53b5f1f344b30b3409acf765ee46005396 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 25 Dec 2007 18:37:42 +0100 Subject: Host SerNet-AIX has __ss_family instead of ss_family in sockaddr_storage (This used to be commit e33286f4a68352e55df081d06307f64f190773b3) --- source3/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 9087c02da1..b6ae3c7c6f 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -233,6 +233,10 @@ typedef unsigned short int sa_family_t; #endif #endif +#ifdef HAVE_AIX_SOCKADDR_STORAGE +#define ss_family __ss_family +#endif + #ifndef HAVE_STRUCT_ADDRINFO #define HAVE_STRUCT_ADDRINFO struct addrinfo { -- cgit From a2bfb1749ca7bc0c713d3508c1324799245c7d1a 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 (cherry picked from commit 1ecb4ec01b0506c95a5f90a62040329e7a39ee93) (This used to be commit ff8a001f0d3f2655efafed41f2f0b14552a5c7e7) --- source3/lib/replace/system/printing.h | 50 ----------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 source3/lib/replace/system/printing.h (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/printing.h b/source3/lib/replace/system/printing.h deleted file mode 100644 index 7eb02d004a..0000000000 --- a/source3/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 1e5418edbc370e87293c324eae54372a495bb932 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 (cherry picked from commit 11bdc9bed80b9842ac1ab8f22509a5d191cddc91) (This used to be commit c11122afda52ce787dd1d3357bd85b6ce36b8ca4) --- source3/lib/replace/system/network.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index b6ae3c7c6f..2f387de5cf 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -227,9 +227,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 db449a4c5f807b11ec723b11a2db32d09162e163 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 15 Jan 2008 16:34:06 +0100 Subject: Revert "Host SerNet-AIX has __ss_family instead of ss_family in sockaddr_storage" This reverts commit e33286f4a68352e55df081d06307f64f190773b3. 393bab185e0e9f02aac5740becc2aba2762133c8 is the v4-0-test fix for the same problem. metze (This used to be commit b8a57a24c390355c4950ca499c1d96aff80abad7) --- source3/lib/replace/system/network.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 2f387de5cf..fe6e46817f 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -242,10 +242,6 @@ typedef unsigned short int sa_family_t; #endif #endif -#ifdef HAVE_AIX_SOCKADDR_STORAGE -#define ss_family __ss_family -#endif - #ifndef HAVE_STRUCT_ADDRINFO #define HAVE_STRUCT_ADDRINFO struct addrinfo { -- cgit From f5df4a100accd163dcd4f41e3bbcd17bb655d1fe 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 (This used to be commit 2f460915111066d79f5dc9b4ae4d003918d06852) --- source3/lib/replace/system/config.m4 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/config.m4 b/source3/lib/replace/system/config.m4 index 799187af7d..1c05733126 100644 --- a/source3/lib/replace/system/config.m4 +++ b/source3/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 00075c49245d5f96139b7c09f37a2b39aa10559f 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 (This used to be commit fb3f7f4046fa195baf5116598772d9016238637f) --- source3/lib/replace/system/network.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index fe6e46817f..aff8a841da 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -137,8 +137,15 @@ const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size); #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 2235ffe2f754da543b796446377b1419bf046204 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. (lib/replace part of 9b4924fbd8619033c55b4c6e2589da247332e7db - Michael) (This used to be commit 789bf2d36bd728cc68b58cfb1e9570b90ca09af7) --- source3/lib/replace/system/network.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index aff8a841da..61be51744c 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 @@ -97,6 +98,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 7728a23d43a79eefaf2cc7e1998283e3d1e095f8 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. (cherry picked from commit fa9e3b6fa871b7541878f836ea54e882e614a3cf) (This used to be commit a2d6f6b4ae7fb6711d4228b9e255eebb6bf344bd) --- source3/lib/replace/system/network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 61be51744c..0b5fbcddd1 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -106,7 +106,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 ea9ce8f9ac44867403673012cd0979f21cf50a27 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. (cherry picked from commit c4cd935ee783b2f4939e2c481bbdb1bbdb9190cd) (This used to be commit 839d128a42aa624e3cd978700059f947022ee733) --- source3/lib/replace/system/network.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 0b5fbcddd1..e03c991b3c 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -109,6 +109,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 f822f4150b2b04619d68686ffdb72e82310a7175 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(). (cherry picked from commit 8c65053f51330bb55a81572264eefbcc56029dc1) (This used to be commit 57587e49f5942b81508b40e3c9a67e7536f2271d) --- source3/lib/replace/system/network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index e03c991b3c..fa5ec9a680 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -120,7 +120,7 @@ int rep_getifaddrs(struct ifaddrs **); #endif #ifndef HAVE_FREEIFADDRS -int rep_freeifaddrs(struct ifaddrs **); +void rep_freeifaddrs(struct ifaddrs **); #endif /* -- cgit From f75d7a69927960ddcc81a31084b1cc11d96838ff 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. (cherry picked from commit cc873bdd2e86e5b380c3056810ccc5ad98372f7c) (This used to be commit ccfb04d18516e0aca88ea0a96afe119175bddba7) --- source3/lib/replace/system/network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index fa5ec9a680..d09e3f71f8 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -120,7 +120,7 @@ int rep_getifaddrs(struct ifaddrs **); #endif #ifndef HAVE_FREEIFADDRS -void rep_freeifaddrs(struct ifaddrs **); +void rep_freeifaddrs(struct ifaddrs *); #endif /* -- cgit From 9ba696cb68a9c16bc2d55ac07df0b1ee626d6261 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 (cherry picked from commit 00c173bfba9c659750bf231fbd9278dd38aa8bfc) (This used to be commit 450034582ba78b296e9cacc9ea06b632196b8644) --- source3/lib/replace/system/config.m4 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/config.m4 b/source3/lib/replace/system/config.m4 index 1c05733126..66c2bd652a 100644 --- a/source3/lib/replace/system/config.m4 +++ b/source3/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 9f5c463415b8b7ea495589ce3fa9deb7c01efb2e 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 7b98620ef16c6969fd21dd9c157aedd4adb117a3) --- source3/lib/replace/system/network.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index d09e3f71f8..a84b22e5d0 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 7bdd648477c49dc7e23f832b2438bef673398fbf 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 c19f7a0e1004213f95e0bf8db5cd1f6697c7a47b) --- source3/lib/replace/system/network.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index a84b22e5d0..410c6d7cca 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 8f58ae97f0c46dc66f680d7b6ed93ee2aa6bc629 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 (This used to be commit 37c87acc9d48c1fb5d4806374ca8e992300db1ff) --- source3/lib/replace/system/network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 410c6d7cca..796df2d1da 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/lib/replace/system/network.h @@ -305,7 +305,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 27517ea5bbd0cb7fb0f1a1d88d8282380f14e717 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 (cherry picked from commit bcb2f3a880f8da8f9bedb7a8e61d7d7b533f1919) (This used to be commit 83baff78ce752a9129554a456cc24d043d419cd1) --- source3/lib/replace/system/network.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index 796df2d1da..e9e770205d 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 5c73dabd49bfca840c062e8c49d8765dc0e4531e 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 (cherry picked from commit 974c0c45ad42644348e0b55454715b12158f1028) (This used to be commit edcf2712bcdedabbfdd9ee8b9a18f46126930636) --- source3/lib/replace/system/network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index e9e770205d..f943a7fd87 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 b57d67c406311d4c859ee1d409a03669f1a1a8b3 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 (cherry picked from commit 94ac8a25be15b55f66eff96fdddc2fdc71a43b1e) (This used to be commit 6c53753246b8108fe1277b34958e122bd800c4e7) --- source3/lib/replace/system/network.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index f943a7fd87..a5fb813aa1 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 0c11e174eefa91029bfd78453639f23bef42c69e 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 (cherry picked from commit 8798ce3c744025b94973784dcb44d099427ef190) (This used to be commit fa443081eaff77623653ed0390c4f9dabc4487b5) --- source3/lib/replace/system/config.m4 | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/config.m4 b/source3/lib/replace/system/config.m4 index 66c2bd652a..ae26bb5590 100644 --- a/source3/lib/replace/system/config.m4 +++ b/source3/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 db4ab7aae3b44b22b70013f13da370b74d429553 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 (cherry picked from commit a9604fe4a323dccb537cf02ea7594437b4995803) (This used to be commit 8a241cf150fba787c82cbcb03730083ced442fbb) --- source3/lib/replace/system/config.m4 | 2 +- source3/lib/replace/system/time.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/config.m4 b/source3/lib/replace/system/config.m4 index ae26bb5590..5c9b53d5c5 100644 --- a/source3/lib/replace/system/config.m4 +++ b/source3/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/source3/lib/replace/system/time.h b/source3/lib/replace/system/time.h index 036812ab8f..4abf295d1a 100644 --- a/source3/lib/replace/system/time.h +++ b/source3/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 107ed5fe0c51abeb4def8f8e2cc041b3f16061ad 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 (cherry picked from commit 3fddd36e119f73a5021370450f9687ef9d252bab) (This used to be commit cd37fdb2401bfd6c23160e34f03238faa1f5cbd3) --- source3/lib/replace/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h index a5fb813aa1..077892a54e 100644 --- a/source3/lib/replace/system/network.h +++ b/source3/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 e86dc14d83b03cd03607f65ef846fc1cad609461 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 14 Sep 2008 18:28:17 +0200 Subject: libreplace: include and and no heimdal specific headers metze (partialy cherry picked from commit cffed8e19e22a1fa7b7a322b153df5d54e4c3be2) (This used to be commit f46a17b408f8c78ecdff724f29d97f8f268d5577) --- source3/lib/replace/system/kerberos.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/lib/replace/system') diff --git a/source3/lib/replace/system/kerberos.h b/source3/lib/replace/system/kerberos.h index 78aa7b943f..2981024bee 100644 --- a/source3/lib/replace/system/kerberos.h +++ b/source3/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