~lefteris-nikoltsios/+junk/samba-lp1016895

« back to all changes in this revision

Viewing changes to lib/replace/replace.h

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
#ifndef PRIi8
82
82
# define PRIi8          "i"
83
83
#endif
84
 
#ifndef PRIi8
 
84
#ifndef PRIi16
85
85
# define PRIi16         "i"
86
86
#endif
87
 
#ifndef PRIi8
 
87
#ifndef PRIi32
88
88
# define PRIi32         "i"
89
89
#endif
90
 
#ifndef PRIi8
 
90
#ifndef PRIi64
91
91
# define PRIi64         __PRI64_PREFIX "i"
92
92
#endif
93
93
 
121
121
#include <stddef.h>
122
122
#endif
123
123
 
 
124
#ifdef HAVE_LINUX_TYPES_H
 
125
/*
 
126
 * This is needed as some broken header files require this to be included early
 
127
 */
 
128
#include <linux/types.h>
 
129
#endif
 
130
 
124
131
#ifndef HAVE_STRERROR
125
132
extern char *sys_errlist[];
126
133
#define strerror(i) sys_errlist[i]
140
147
void *rep_memmove(void *dest,const void *src,int size);
141
148
#endif
142
149
 
 
150
#ifndef HAVE_MEMMEM
 
151
#define memmem rep_memmem
 
152
void *rep_memmem(const void *haystack, size_t haystacklen,
 
153
                 const void *needle, size_t needlelen);
 
154
#endif
 
155
 
143
156
#ifndef HAVE_MKTIME
144
157
#define mktime rep_mktime
145
158
/* prototype is in "system/time.h" */
277
290
char *rep_strtok_r(char *s, const char *delim, char **save_ptr);
278
291
#endif
279
292
 
 
293
 
 
294
 
280
295
#ifndef HAVE_STRTOLL
281
296
#define strtoll rep_strtoll
282
297
long long int rep_strtoll(const char *str, char **endptr, int base);
 
298
#else
 
299
#ifdef HAVE_BSD_STRTOLL
 
300
#define strtoll rep_strtoll
 
301
long long int rep_strtoll(const char *str, char **endptr, int base);
 
302
#endif
283
303
#endif
284
304
 
285
305
#ifndef HAVE_STRTOULL
286
306
#define strtoull rep_strtoull
287
307
unsigned long long int rep_strtoull(const char *str, char **endptr, int base);
 
308
#else
 
309
#ifdef HAVE_BSD_STRTOLL /* yes, it's not HAVE_BSD_STRTOULL */
 
310
#define strtoull rep_strtoull
 
311
unsigned long long int rep_strtoull(const char *str, char **endptr, int base);
 
312
#endif
288
313
#endif
289
314
 
290
315
#ifndef HAVE_FTRUNCATE
330
355
/* prototype is in system/network.h */
331
356
#endif
332
357
 
 
358
#ifndef HAVE_VDPRINTF
 
359
#define vdprintf rep_vdprintf
 
360
int rep_vdprintf(int fd, const char *format, va_list ap);
 
361
#endif
 
362
 
 
363
#ifndef HAVE_DPRINTF
 
364
#define dprintf rep_dprintf
 
365
int rep_dprintf(int fd, const char *format, ...);
 
366
#endif
 
367
 
333
368
#ifndef PRINTF_ATTRIBUTE
334
369
#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
335
370
/** Use gcc attribute to check printf fns.  a1 is the 1-based index of
491
526
/* prototype is in "system/network.h" */
492
527
#endif
493
528
 
 
529
#ifndef HAVE_GET_CURRENT_DIR_NAME
 
530
#define get_current_dir_name rep_get_current_dir_name
 
531
char *rep_get_current_dir_name(void);
 
532
#endif
 
533
 
 
534
#if !defined(HAVE_STRERROR_R) || !defined(STRERROR_R_PROTO_COMPATIBLE)
 
535
#undef strerror_r
 
536
#define strerror_r rep_strerror_r
 
537
int rep_strerror_r(int errnum, char *buf, size_t buflen);
 
538
#endif
 
539
 
 
540
#if !defined(HAVE_CLOCK_GETTIME)
 
541
#define clock_gettime rep_clock_gettime
 
542
#endif
 
543
 
494
544
#ifdef HAVE_LIMITS_H
495
545
#include <limits.h>
496
546
#endif
723
773
#endif
724
774
#endif
725
775
 
 
776
#ifndef HAVE_FDATASYNC
 
777
#define fdatasync(fd) fsync(fd)
 
778
#elif !defined(HAVE_DECL_FDATASYNC)
 
779
int fdatasync(int );
 
780
#endif
 
781
 
 
782
/* these are used to mark symbols as local to a shared lib, or
 
783
 * publicly available via the shared lib API */
 
784
#ifndef _PUBLIC_
 
785
#ifdef HAVE_VISIBILITY_ATTR
 
786
#define _PUBLIC_ __attribute__((visibility("default")))
 
787
#else
 
788
#define _PUBLIC_
 
789
#endif
 
790
#endif
 
791
 
 
792
#ifndef _PRIVATE_
 
793
#ifdef HAVE_VISIBILITY_ATTR
 
794
#  define _PRIVATE_ __attribute__((visibility("hidden")))
 
795
#else
 
796
#  define _PRIVATE_
 
797
#endif
 
798
#endif
 
799
 
 
800
#ifndef HAVE_POLL
 
801
#define poll rep_poll
 
802
/* prototype is in "system/network.h" */
 
803
#endif
 
804
 
726
805
#endif /* _LIBREPLACE_REPLACE_H */