~ubuntu-branches/ubuntu/oneiric/cups/oneiric-proposed

« back to all changes in this revision

Viewing changes to cups/thread-private.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt, Till Kamppeter, Martin Pitt
  • Date: 2011-08-07 12:53:12 UTC
  • mfrom: (1.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20110807125312-s323cyb3oqaxaemo
Tags: 1.5.0-1
[ Till Kamppeter ]
* New upstream release
* debian/patches/usb-backend-no-segfault-on-bad-device-id.patch,
  debian/patches/usb-backend-accept-old-usblp-uris.patch,
  debian/patches/use-ps2write-ghostscript-device-for-pdftops-filter.patch:
  Removed, included upstream.
* debian/patches/poppler-based-pdftops-fixes.patch,
  debian/patches/do-not-emit-ps-level-3-with-poppler.patch: Replaced patch
  by a new one only containing the parts which remain after removing the
  parts included upstream.
* debian/patches/pidfile.patch,
  debian/patches/ppd-poll-with-client-conf.patch,
  debian/patches/cups-avahi.patch,
  debian/patches/drop_unnecessary_dependencies.patch,
  debian/patches/do-not-broadcast-with-hostnames.patch,
  debian/patches/ppdc-dynamic-linking.patch,
  debian/patches/pstops-based-workflow-only-for-printing-ps-on-a-ps-printer.patch:
  Manually regenerated to adapt to upstream changes.
* debian/patches/manpage-translations.patch,
  debian/patches/rootbackends-worldreadable.patch,
  debian/patches/no-conffile-timestamp.patch,
  debian/patches/read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch,
  debian/patches/cups-snmp-oids-device-id-hp-ricoh.patch,
  debian/patches/configure-default-browse-protocols.patch,
  debian/patches/logfiles_adm_readable.patch,
  debian/patches/confdirperms.patch,
  debian/patches/printer-filtering.patch,
  debian/patches/show-compile-command-lines.patch,
  debian/patches/log-debug-history-nearly-unlimited.patch:
  Refreshed using quilt.
* debian/patches/default-ripcache-size-auto.patch: Dropped, as once,
  Ghostscript 9.04 is ignoring the cache size value as it crashes easily
  otherwise (Ghostscript upstream bug #691586) and second, CUPS defaults to
  more reasonable 128 MB (now only used for imagetops).
* debian/patches/support-gzipped-charmaps.patch: Dropped, as the SBCS and
  VBCS character maps are not used any more by CUPS.
* debian/rules: Enable threads in the ./configure command line, as otherwise
  CUPS 1.5.0 does not build at all.
* debian/local/filters/pdf-filters/filter/pdftoijs.cxx,
  debian/local/filters/pdf-filters/filter/pdftoraster.cxx,
  debian/local/filters/pdf-filters/pdftoopvp/pdftoopvp.cxx,
  debian/local/filters/pdf-filters/pdftopdf/pdftopdf.cxx: Under CUPS 1.5.x.
  all programs using the PPD API of CUPS need to explicitly include
  "<cups/ppd.h>". Updated the PDF filter add-on package.
* debian/local/filters/pdf-filters/addtocups: Make the addition of the
  pdftopdf and pdftoopvp directories also work with CUPS 1.5.x.
* debian/local/filters/pdf-filters/addtocups,
  debian/local/filters/pdf-filters/removefromcups: Added a symbolic link
  cups/i18n.h, so that texttopdf builds.
* debian/cups-client.install: Install the new ipptool and its sample
  files and manpages.
* debian/cups-client.install: Commented out lines for dropped man page
  translations: ipptool, lppasswd, client.conf, ipptoolfile, cupsenable,
  lpadmin, lpinfo, cupsreject, cupsdisable, cupsaccept
* debian/cups-common.install, debian/rules: The /usr/share/cups/charmaps
  directory got removed from CUPS.
* debian/libcups2-dev.install: cups/i18n.h got renamed to
  cups/language-private.h. Install this as /usr/include/cups/i18n.h.
* debian/libcups2.symbols, debian/libcupsmime1.symbols: Updated.
* debian/cups.lintian-overrides, debian/cups.postinst, debian/cups.prerm,
  debian/cups.templates, debian/local/apparmor-profile: The "scsi"
  CUPS backend got dropped upstream, removed its treatment from these files.

[ Martin Pitt ]
* Add Serbian (Cyrillic) debconf translations, thanks Zlatan Todoric.
  (Closes: #635105)
* Add Serbian (Latin) debconf translations, thanks Zlatan Todoric.
  (Closes: #635108)
* debian/local/apparmor-profile: Allow access to serial printers on USB
  adapters. (LP: #677432)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * "$Id: thread-private.h 9755 2011-05-09 22:53:31Z mike $"
 
3
 *
 
4
 *   Private threading definitions for CUPS.
 
5
 *
 
6
 *   Copyright 2009-2010 by Apple Inc.
 
7
 *
 
8
 *   These coded instructions, statements, and computer programs are the
 
9
 *   property of Apple Inc. and are protected by Federal copyright
 
10
 *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
 
11
 *   which should have been included with this file.  If this file is
 
12
 *   file is missing or damaged, see the license at "http://www.cups.org/".
 
13
 */
 
14
 
 
15
#ifndef _CUPS_THREAD_PRIVATE_H_
 
16
#  define _CUPS_THREAD_PRIVATE_H_
 
17
 
 
18
/*
 
19
 * Include necessary headers...
 
20
 */
 
21
 
 
22
#  include "config.h"
 
23
 
 
24
 
 
25
/*
 
26
 * C++ magic...
 
27
 */
 
28
 
 
29
#  ifdef __cplusplus
 
30
extern "C" {
 
31
#  endif /* __cplusplus */
 
32
 
 
33
 
 
34
#  ifdef HAVE_PTHREAD_H
 
35
#    include <pthread.h>
 
36
typedef void *(*_cups_thread_func_t)(void *arg);
 
37
typedef pthread_mutex_t _cups_mutex_t;
 
38
typedef pthread_rwlock_t _cups_rwlock_t;
 
39
typedef pthread_key_t   _cups_threadkey_t;
 
40
#    define _CUPS_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
 
41
#    define _CUPS_RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER
 
42
#    define _CUPS_THREADKEY_INITIALIZER -1
 
43
#    define _cupsThreadGetData(k) pthread_getspecific(k)
 
44
#    define _cupsThreadSetData(k,p) pthread_setspecific(k,p)
 
45
 
 
46
#  elif defined(WIN32)
 
47
#    include <winsock2.h>
 
48
#    include <windows.h>
 
49
typedef void *(__stdcall *_cups_thread_func_t)(void *arg);
 
50
typedef struct _cups_mutex_s
 
51
{
 
52
  int                   m_init;         /* Flag for on-demand initialization */         
 
53
  CRITICAL_SECTION      m_criticalSection;
 
54
                                        /* Win32 Critical Section */
 
55
} _cups_mutex_t;
 
56
typedef _cups_mutex_t _cups_rwlock_t;   /* TODO: Implement Win32 reader/writer lock */
 
57
typedef DWORD   _cups_threadkey_t;
 
58
#    define _CUPS_MUTEX_INITIALIZER { 0, 0 }
 
59
#    define _CUPS_RWLOCK_INITIALIZER { 0, 0 }
 
60
#    define _CUPS_THREADKEY_INITIALIZER 0
 
61
#    define _cupsThreadGetData(k) TlsGetValue(k)
 
62
#    define _cupsThreadSetData(k,p) TlsSetValue(k,p)
 
63
 
 
64
#  else
 
65
typedef char    _cups_mutex_t;
 
66
typedef char    _cups_rwlock_t;
 
67
typedef void    *_cups_threadkey_t;
 
68
#    define _CUPS_MUTEX_INITIALIZER 0
 
69
#    define _CUPS_RWLOCK_INITIALIZER 0
 
70
#    define _CUPS_THREADKEY_INITIALIZER (void *)0
 
71
#    define _cupsThreadGetData(k) k
 
72
#    define _cupsThreadSetData(k,p) k=p
 
73
#  endif /* HAVE_PTHREAD_H */
 
74
 
 
75
 
 
76
/*
 
77
 * Functions...
 
78
 */
 
79
 
 
80
extern void     _cupsMutexInit(_cups_mutex_t *mutex);
 
81
extern void     _cupsMutexLock(_cups_mutex_t *mutex);
 
82
extern void     _cupsMutexUnlock(_cups_mutex_t *mutex);
 
83
extern void     _cupsRWInit(_cups_rwlock_t *rwlock);
 
84
extern void     _cupsRWLockRead(_cups_rwlock_t *rwlock);
 
85
extern void     _cupsRWLockWrite(_cups_rwlock_t *rwlock);
 
86
extern void     _cupsRWUnlock(_cups_rwlock_t *rwlock);
 
87
extern int      _cupsThreadCreate(_cups_thread_func_t func, void *arg);
 
88
 
 
89
 
 
90
#  ifdef __cplusplus
 
91
}
 
92
#  endif /* __cplusplus */
 
93
#endif /* !_CUPS_THREAD_PRIVATE_H_ */
 
94
 
 
95
/*
 
96
 * End of "$Id: thread-private.h 9755 2011-05-09 22:53:31Z mike $".
 
97
 */