~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/config/cf/nto.rules

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
XCOMM $XFree86: xc/config/cf/nto.rules,v 1.4 2002/01/16 00:40:00 keithp Exp $ 
 
2
XCOMM Rules for QNX/Neutrino
 
3
XCOMM Note that some of these will disappear when we stop cross-compiling
 
4
 
 
5
#ifndef HasSharedLibraries
 
6
#define HasSharedLibraries YES
 
7
#endif
 
8
 
 
9
#ifndef SharedDataSeparation
 
10
#define SharedDataSeparation NO
 
11
#endif
 
12
#ifndef SharedCodeDef
 
13
#define SharedCodeDef /**/
 
14
#endif
 
15
#ifndef SharedLibraryDef
 
16
#define SharedLibraryDef /**/
 
17
#endif
 
18
#ifndef SharedLibraryLoadFlags
 
19
#define SharedLibraryLoadFlags -shared
 
20
#endif
 
21
#ifndef PositionIndependentCFlags
 
22
#define PositionIndependentCFlags -fPIC
 
23
#endif
 
24
#ifndef PositionIndependentCplusplusFlags
 
25
#define PositionIndependentCplusplusFlags -fPIC
 
26
#endif
 
27
 
 
28
#define LinkFile(tofile, fromfile)                              @@\
 
29
tofile:: fromfile                                               @@\
 
30
        $(CP) fromfile tofile                                   @@\
 
31
                                                                @@\
 
32
includes:: tofile                                               @@\
 
33
                                                                @@\
 
34
depend:: tofile                                                 @@\
 
35
                                                                @@\
 
36
clean::                                                         @@\
 
37
        RemoveFile(tofile)
 
38
 
 
39
#define ObjectFromSpecialSource(dst, src, flags)                @@\
 
40
NoConfigRec(dst.c)                                              @@\
 
41
                                                                @@\
 
42
dst.c: src.c                                                    @@\
 
43
        RemoveFile($@)                                          @@\
 
44
        $(CP) $? $@                                             @@\
 
45
                                                                @@\
 
46
SpecialCObjectRule(dst,NullParameter,flags)                     @@\
 
47
                                                                @@\
 
48
includes:: dst.c                                                @@\
 
49
                                                                @@\
 
50
depend:: dst.c                                                  @@\
 
51
                                                                @@\
 
52
clean::                                                         @@\
 
53
        RemoveFile(dst.c)
 
54
 
 
55
 
 
56
#define ObjectFromSpecialAsmSource(dst, src, flags)             @@\
 
57
dst.S: src.S                                                    @@\
 
58
        RemoveFile($@)                                          @@\
 
59
        $(CP) $? $@                                             @@\
 
60
                                                                @@\
 
61
dst.o: dst.S                                                    @@\
 
62
        AssembleObject(flags)                                   @@\
 
63
                                                                @@\
 
64
dst.i: dst.S                                                    @@\
 
65
        CPPOnlyAsm(dst,flags)                                   @@\
 
66
                                                                @@\
 
67
depend:: dst.S                                                  @@\
 
68
                                                                @@\
 
69
clean::                                                         @@\
 
70
        RemoveFile(dst.S)
 
71
 
 
72
XCOMM Special rule ComplexHostProgramTarget needed to compile 
 
73
XCOMM our utilities locally because we are cross-compiling...
 
74
XCOMM
 
75
 
 
76
#define ComplexHostProgramTarget(program)                       @@\
 
77
           CC=cc                                                @@\
 
78
           STD_INCLUDES =                                       @@\
 
79
           CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)        @@\
 
80
           CCOPTIONS =                                          @@\
 
81
           EXTRA_LOAD_FLAGS =                                   @@\
 
82
           PROGRAM = program                                    @@\
 
83
                                                                @@\
 
84
AllTarget(program)                                              @@\
 
85
                                                                @@\
 
86
program: $(OBJS) $(DEPLIBS)                                     @@\
 
87
        RemoveTargetProgram($@)                                 @@\
 
88
        HostLinkRule($@,$(_NOOP_),$(OBJS),$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
 
89
                                                                @@\
 
90
DependTarget()                                                  @@\
 
91
                                                                @@\
 
92
clean::                                                         @@\
 
93
        RemoveFile(ProgramTargetName(program))
 
94
 
 
95
XCOMM And this rule is again for a host simple host program when cross-compiling.
 
96
XCOMM
 
97
 
 
98
#define SimpleHostProgramTarget(program)                        @@\
 
99
         OBJS = program.o                                       @@\
 
100
         SRCS = program.c                                       @@\
 
101
                                                                @@\
 
102
ComplexHostProgramTarget(program)
 
103
        
 
104
 
 
105
#ifndef FixupLibReferences
 
106
#define FixupLibReferences()                                            @@\
 
107
XMULIBONLY = -lXmu                                                      @@\
 
108
XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
 
109
#endif
 
110
 
 
111
#ifndef SharedLibraryTarget
 
112
#ifdef UseInstalled
 
113
#define LinkBuildSonameLibrary(lib) true
 
114
#else
 
115
#define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); \
 
116
        cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
 
117
#endif
 
118
 
 
119
#define SharedLibraryTarget(libname,rev,solist,down,up)                 @@\
 
120
AllTarget(Concat(lib,libname.so.rev))                                   @@\
 
121
                                                                        @@\
 
122
Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)                 @@\
 
123
        $(RM) $@~                                                       @@\
 
124
        @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \             @@\
 
125
                (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
 
126
                $(RM) $$SONAME; $(LN) $@ $$SONAME; \                    @@\
 
127
                LinkBuildSonameLibrary($$SONAME)                        @@\
 
128
        $(RM) $@                                                        @@\
 
129
        $(MV) $@~ $@                                                    @@\
 
130
        @if $(SOSYMLINK); then (set -x; \                               @@\
 
131
         $(RM) Concat(lib,libname.so); \                                @@\
 
132
         $(LN) $@ Concat(lib,libname.so)); fi                           @@\
 
133
        LinkBuildLibrary($@)                                            @@\
 
134
        LinkBuildLibrary(Concat(lib,libname.so))                        @@\
 
135
                                                                        @@\
 
136
clean::                                                                 @@\
 
137
        @MAJREV=`expr rev : '\([^.]*\)'`; \                             @@\
 
138
        set -x; $(RM) Concat(lib,libname.so.$$MAJREV)                   @@\
 
139
        $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
 
140
#endif
 
141
/*
 
142
 * InstallSharedLibrary - generate rules to install the shared library.
 
143
 * NOTE: file must be executable, hence "INSTBINFLAGS"
 
144
 */
 
145
#ifndef InstallSharedLibrary
 
146
#define InstallSharedLibrary(libname,rev,dest)                          @@\
 
147
install:: Concat(lib,libname.so.rev)                                    @@\
 
148
        MakeDir($(DESTDIR)dest)                                         @@\
 
149
        $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
 
150
        @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\
 
151
          set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T     @@\
 
152
        @if $(SOSYMLINK); then (set -x; \
 
153
          $(RM) Concat($(DESTDIR)dest/lib,libname.so); \                @@\
 
154
          $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)); fi
 
155
#endif /* InstallSharedLibrary */
 
156
 
 
157
/*
 
158
 * SharedLibraryDataTarget - generate rules to create shlib data file;
 
159
 */
 
160
#ifndef SharedLibraryDataTarget
 
161
#define SharedLibraryDataTarget(libname,rev,salist)
 
162
#endif /* SharedLibraryTarget */
 
163
 
 
164
/*
 
165
 * InstallSharedLibraryData - generate rules to install the shared library data
 
166
 */
 
167
#ifndef InstallSharedLibraryData
 
168
#define InstallSharedLibraryData(libname,rev,dest)
 
169
#endif /* InstallSharedLibraryData */
 
170
 
 
171
#define BaseShLibReqs
 
172
 
 
173
 
 
174
 
 
175
/*
 
176
 * ServerTargetWithFlags - generate rules to compile, link, and relink a server
 
177
 */
 
178
#ifndef ServerTargetWithFlags
 
179
#define ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,flags) @@\
 
180
AllTarget(ProgramTargetName(server))                                    @@\
 
181
ProgramTargetName(server): subdirs objects libs                         @@\
 
182
        MoveToBakFile($@)                                               @@\
 
183
        LinkRule($@,$(LDOPTIONS),objects,libs $(LDLIBS) syslibs)        @@\
 
184
                                                                        @@\
 
185
Concat(load,server):                                                    @@\
 
186
        MoveToBakFile(ProgramTargetName(server))                        @@\
 
187
        LinkRule(ProgramTargetName(server),$(LDOPTIONS),objects,libs $(LDLIBS) syslibs) @@\
 
188
                                                                        @@\
 
189
loadX:: Concat(load,server)                                             @@\
 
190
                                                                        @@\
 
191
SentinelProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
 
192
SentinelLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
 
193
PurifyProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
 
194
PurifyLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
 
195
ProofProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
 
196
ProofLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
 
197
                                                                        @@\
 
198
InstallProgramWithFlags(server,$(BINDIR),flags)                         @@\
 
199
                                                                        @@\
 
200
clean::                                                                 @@\
 
201
        RemoveFile(ProgramTargetName(server))
 
202
#endif /* ServerTargetWithFlags */
 
203
 
 
204
/*
 
205
 * SharedDepLibraryTarget - generate rules to create a shared library.
 
206
 */
 
207
#ifndef SharedDepLibraryTarget
 
208
#ifdef UseInstalled
 
209
#ifndef LinkBuildSonameLibrary
 
210
#define LinkBuildSonameLibrary(lib) true
 
211
#endif
 
212
#else
 
213
#ifndef LinkBuildSonameLibrary
 
214
#define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); \
 
215
        cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
 
216
#endif
 
217
#endif
 
218
 
 
219
#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up)      @@\
 
220
AllTarget(Concat(lib,libname.so.rev))                                   @@\
 
221
                                                                        @@\
 
222
Concat(lib,libname.so.rev):  deplist $(EXTRALIBRARYDEPS)                @@\
 
223
        $(RM) $@~                                                       @@\
 
224
        @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \             @@\
 
225
                (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
 
226
                $(RM) $$SONAME; $(LN) $@ $$SONAME; \                    @@\
 
227
                LinkBuildSonameLibrary($$SONAME)                        @@\
 
228
        $(RM) $@                                                        @@\
 
229
        $(MV) $@~ $@                                                    @@\
 
230
        @if $(SOSYMLINK); then (set -x; \                               @@\
 
231
          $(RM) Concat(lib,libname.so); \                               @@\
 
232
          $(LN) $@ Concat(lib,libname.so)); fi                          @@\
 
233
        LinkBuildLibrary($@)                                            @@\
 
234
        LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK))      @@\
 
235
                                                                        @@\
 
236
clean::                                                                 @@\
 
237
        @MAJREV=`expr rev : '\([^.]*\)'`; \                             @@\
 
238
        set -x; $(RM) Concat(lib,libname.so.$$MAJREV)                   @@\
 
239
        $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
 
240
 
 
241
#endif /* SharedDepLibraryTarget */
 
242
 
 
243
#ifndef SharedDepModuleTarget
 
244
#define SharedDepModuleTarget(name,deps,solist)                         @@\
 
245
AllTarget(name)                                                         @@\
 
246
 
 
247
                                                                        @@\
 
248
name: deps                                                              @@\
 
249
        $(RM) $@~                                                       @@\
 
250
        $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\
 
251
        $(RM) $@                                                        @@\
 
252
        $(MV) $@~ $@                                                    @@\
 
253
                                                                        @@\
 
254
clean::                                                                 @@\
 
255
        $(RM) name
 
256
 
 
257
#endif /* SharedDepModuleTarget */
 
258