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/time.h | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 source3/lib/replace/system/time.h (limited to 'source3/lib/replace/system/time.h') 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 -- 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/time.h | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'source3/lib/replace/system/time.h') 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 -- 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/time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/replace/system/time.h') 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 -- 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/time.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/lib/replace/system/time.h') 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 . */ -- 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/time.h') 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 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/time.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source3/lib/replace/system/time.h') 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