Debian Codegraph @

upstream/opensuse-tumbleweed/man1/perlcygwin.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "PERLCYGWIN 1"
61 .TH PERLCYGWIN 1 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 perlcygwin \- Perl for Cygwin
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 This document will help you configure, make, test and install Perl
71 on Cygwin. This document also describes features of Cygwin that will
72 affect how Perl behaves at runtime.
73 .PP
74 \&\fBNOTE:\fR There are pre\-built Perl packages available for Cygwin and a
75 version of Perl is provided in the normal Cygwin install. If you do
76 not need to customize the configuration, consider using one of those
77 packages.
78 .SH "PREREQUISITES FOR COMPILING PERL ON CYGWIN"
79 .IX Header "PREREQUISITES FOR COMPILING PERL ON CYGWIN"
80 .SS "Cygwin = GNU+Cygnus+Windows (Don\*(Aqt leave UNIX without it)"
81 .IX Subsection "Cygwin = GNU+Cygnus+Windows (Don't leave UNIX without it)"
82 The Cygwin tools are ports of the popular GNU development tools for Win32
83 platforms. They run thanks to the Cygwin library which provides the UNIX
84 system calls and environment these programs expect. More information
85 about this project can be found at:
86 .PP
87 <https://www.cygwin.com/>
88 .PP
89 A recent net or commercial release of Cygwin is required.
90 .PP
91 At the time this document was last updated, Cygwin 3.0.7 was current.
92 .SS "Cygwin Configuration"
93 .IX Subsection "Cygwin Configuration"
94 While building Perl some changes may be necessary to your Cygwin setup so
95 that Perl builds cleanly. These changes are \fBnot\fR required for normal
96 Perl usage.
97 .PP
98 \&\fBNOTE:\fR The binaries that are built will run on all Win32 versions.
99 They do not depend on your host system or your
100 Cygwin configuration (binary/text mounts, cygserver).
101 The only dependencies come from hard\-coded pathnames like \fI/usr/local\fR.
102 However, your host system and Cygwin configuration will affect Perl\*(Aqs
103 runtime behavior (see "TEST").
104 .IP \(bu 4
105 \&\f(CW\*(C`PATH\*(C'\fR
106 .Sp
107 Set the \f(CW\*(C`PATH\*(C'\fR environment variable so that Configure finds the Cygwin
108 versions of programs. Any not\-needed Windows directories should be removed or
109 moved to the end of your \f(CW\*(C`PATH\*(C'\fR.
110 .IP \(bu 4
111 \&\fInroff\fR
112 .Sp
113 If you do not have \fInroff\fR (which is part of the \fIgroff\fR package),
114 Configure will \fBnot\fR prompt you to install \fIman\fR pages.
115 .SH "CONFIGURE PERL ON CYGWIN"
116 .IX Header "CONFIGURE PERL ON CYGWIN"
117 The default options gathered by Configure with the assistance of
118 \&\fIhints/cygwin.sh\fR will build a Perl that supports dynamic loading
119 (which requires a shared \fIcygperl5_16.dll\fR).
120 .PP
121 This will run Configure and keep a record:
122 .PP
123 .Vb 1
124 \& ./Configure 2>&1 | tee log.configure
125 .Ve
126 .PP
127 If you are willing to accept all the defaults run Configure with \fB\-de\fR.
128 However, several useful customizations are available.
129 .SS "Stripping Perl Binaries on Cygwin"
130 .IX Subsection "Stripping Perl Binaries on Cygwin"
131 It is possible to strip the EXEs and DLLs created by the build process.
132 The resulting binaries will be significantly smaller. If you want the
133 binaries to be stripped, you can either add a \fB\-s\fR option when Configure
134 prompts you,
135 .PP
136 .Vb 5
137 \& Any additional ld flags (NOT including libraries)? [none] \-s
138 \& Any special flags to pass to g++ to create a dynamically loaded
139 \& library?
140 \& [none] \-s
141 \& Any special flags to pass to gcc to use dynamic linking? [none] \-s
142 .Ve
143 .PP
144 or you can edit \fIhints/cygwin.sh\fR and uncomment the relevant variables
145 near the end of the file.
146 .SS "Optional Libraries for Perl on Cygwin"
147 .IX Subsection "Optional Libraries for Perl on Cygwin"
148 Several Perl functions and modules depend on the existence of
149 some optional libraries. Configure will find them if they are
150 installed in one of the directories listed as being used for library
151 searches. Pre\-built packages for most of these are available from
152 the Cygwin installer.
153 .IP \(bu 4
154 \&\f(CW\*(C`\-lcrypt\*(C'\fR
155 .Sp
156 The crypt package distributed with Cygwin is a Linux compatible 56\-bit
157 DES crypt port by Corinna Vinschen.
158 .Sp
159 Alternatively, the crypt libraries in GNU libc have been ported to Cygwin.
160 .Sp
161 As of libcrypt 1.3 (March 2016), you will need to install the
162 libcrypt\-devel package for Configure to detect \fBcrypt()\fR.
163 .IP \(bu 4
164 \&\f(CW\*(C`\-lgdbm_compat\*(C'\fR (\f(CW\*(C`use GDBM_File\*(C'\fR)
165 .Sp
166 GDBM is available for Cygwin.
167 .Sp
168 NOTE: The GDBM library only works on NTFS partitions.
169 .IP \(bu 4
170 \&\f(CW\*(C`\-ldb\*(C'\fR (\f(CW\*(C`use DB_File\*(C'\fR)
171 .Sp
172 BerkeleyDB is available for Cygwin.
173 .Sp
174 NOTE: The BerkeleyDB library only completely works on NTFS partitions.
175 .IP \(bu 4
176 \&\f(CW\*(C`cygserver\*(C'\fR (\f(CW\*(C`use IPC::SysV\*(C'\fR)
177 .Sp
178 A port of SysV IPC is available for Cygwin.
179 .Sp
180 NOTE: This has \fBnot\fR been extensively tested. In particular,
181 \&\f(CW\*(C`d_semctl_semun\*(C'\fR is undefined because it fails a Configure test. It
182 also creates a compile time dependency because \fIperl.h\fR includes
183 \&\fI<sys/ipc.h\fR> and \fI<sys/sem.h\fR> (which will be required in the
184 future when compiling CPAN modules). CURRENTLY NOT SUPPORTED!
185 .IP \(bu 4
186 \&\f(CW\*(C`\-lutil\*(C'\fR
187 .Sp
188 Included with the standard Cygwin netrelease is the inetutils package
189 which includes libutil.a.
190 .SS "Configure\-time Options for Perl on Cygwin"
191 .IX Subsection "Configure-time Options for Perl on Cygwin"
192 The \fIINSTALL\fR document describes several Configure\-time options. Some of
193 these will work with Cygwin, others are not yet possible. Also, some of
194 these are experimental. You can either select an option when Configure
195 prompts you or you can define (undefine) symbols on the command line.
196 .IP \(bu 4
197 \&\f(CW\*(C`\-Uusedl\*(C'\fR
198 .Sp
199 Undefining this symbol forces Perl to be compiled statically.
200 .IP \(bu 4
201 \&\f(CW\*(C`\-Dusemymalloc\*(C'\fR
202 .Sp
203 By default Perl does not use the \f(CWmalloc()\fR included with the Perl source,
204 because it was slower and not entirely thread\-safe. If you want to force
205 Perl to build with the old \-Dusemymalloc define this.
206 .IP \(bu 4
207 \&\f(CW\*(C`\-Uuseperlio\*(C'\fR
208 .Sp
209 Undefining this symbol disables the PerlIO abstraction. PerlIO is now the
210 default; it is not recommended to disable PerlIO.
211 .IP \(bu 4
212 \&\f(CW\*(C`\-Dusemultiplicity\*(C'\fR
213 .Sp
214 Multiplicity is required when embedding Perl in a C program and using
215 more than one interpreter instance. This is only required when you build
216 a not\-threaded perl with \f(CW\*(C`\-Uuseithreads\*(C'\fR.
217 .IP \(bu 4
218 \&\f(CW\*(C`\-Uuse64bitint\*(C'\fR
219 .Sp
220 By default Perl uses 64 bit integers. If you want to use smaller 32 bit
221 integers, define this symbol.
222 .IP \(bu 4
223 \&\f(CW\*(C`\-Duselongdouble\*(C'\fR
224 .Sp
225 \&\fIgcc\fR supports long doubles (12 bytes). However, several additional
226 long double math functions are necessary to use them within Perl
227 (\fI{atan2, cos, exp, floor, fmod, frexp, isnan, log, modf, pow, sin, sqrt}l,
228 strtold\fR).
229 These are \fBnot\fR yet available with newlib, the Cygwin libc.
230 .IP \(bu 4
231 \&\f(CW\*(C`\-Uuseithreads\*(C'\fR
232 .Sp
233 Define this symbol if you want not\-threaded faster perl.
234 .IP \(bu 4
235 \&\f(CW\*(C`\-Duselargefiles\*(C'\fR
236 .Sp
237 Cygwin uses 64\-bit integers for internal size and position calculations,
238 this will be correctly detected and defined by Configure.
239 .IP \(bu 4
240 \&\f(CW\*(C`\-Dmksymlinks\*(C'\fR
241 .Sp
242 Use this to build perl outside of the source tree. Details can be
243 found in the \fIINSTALL\fR document. This is the recommended way to
244 build perl from sources.
245 .SH "MAKE ON CYGWIN"
246 .IX Header "MAKE ON CYGWIN"
247 Simply run \fImake\fR and wait:
248 .PP
249 .Vb 1
250 \& make \-jn 2>&1 | tee log.make
251 .Ve
252 .PP
253 where \fIn\fR is the maximum number of simultaneous compilations you want;
254 omitting this parameter is the same as specifying \f(CW\*(C`\-j1\*(C'\fR.
255 .SH "TEST ON CYGWIN"
256 .IX Header "TEST ON CYGWIN"
257 There are two steps to running the test suite:
258 .PP
259 .Vb 1
260 \& make test 2>&1 | tee log.make\-test
261 \&
262 \& cd t; ./perl harness 2>&1 | tee ../log.harness
263 .Ve
264 .PP
265 The same tests are run both times, but more information is provided when
266 running as \f(CW\*(C`./perl harness\*(C'\fR, and you can run the tests in parallel by
267 instead specifying
268 .PP
269 .Vb 1
270 \& cd t; TEST_JOBS=n ./perl harness 2>&1 | tee ../log.harness
271 .Ve
272 .PP
273 where \fIn\fR is the maximum number of tests to run simulataneously.
274 .PP
275 Test results vary depending on your host system and your Cygwin
276 configuration. If a test can pass in some Cygwin setup, it is always
277 attempted and explainable test failures are documented. It is possible
278 for Perl to pass all the tests, but it is more likely that some tests
279 will fail for one of the reasons listed below.
280 .SS "File Permissions on Cygwin"
281 .IX Subsection "File Permissions on Cygwin"
282 UNIX file permissions are based on sets of mode bits for
283 {read,write,execute} for each {user,group,other}. By default Cygwin
284 only tracks the Win32 read\-only attribute represented as the UNIX file
285 user write bit (files are always readable, files are executable if they
286 have a \fI.{com,bat,exe}\fR extension or begin with \f(CW\*(C`#!\*(C'\fR, directories are
287 always readable and executable). On WinNT with the \fIntea\fR \f(CW\*(C`CYGWIN\*(C'\fR
288 setting, the additional mode bits are stored as extended file attributes.
289 On WinNT with the default \fIntsec\fR \f(CW\*(C`CYGWIN\*(C'\fR setting, permissions use the
290 standard WinNT security descriptors and access control lists. Without one of
291 these options, these tests will fail (listing not updated yet):
292 .PP
293 .Vb 12
294 \& Failed Test List of failed
295 \& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
296 \& io/fs.t 5, 7, 9\-10
297 \& lib/anydbm.t 2
298 \& lib/db\-btree.t 20
299 \& lib/db\-hash.t 16
300 \& lib/db\-recno.t 18
301 \& lib/gdbm.t 2
302 \& lib/ndbm.t 2
303 \& lib/odbm.t 2
304 \& lib/sdbm.t 2
305 \& op/stat.t 9, 20 (.tmp not an executable extension)
306 .Ve
307 .SS "NDBM_File and ODBM_File do not work on FAT filesystems"
308 .IX Subsection "NDBM_File and ODBM_File do not work on FAT filesystems"
309 Do not use NDBM_File or ODBM_File on FAT filesystem. They can be
310 built on a FAT filesystem, but many tests will fail:
311 .PP
312 .Vb 6
313 \& ../ext/NDBM_File/ndbm.t 13 3328 71 59 83.10% 1\-2 4 16\-71
314 \& ../ext/ODBM_File/odbm.t 255 65280 ?? ?? % ??
315 \& ../lib/AnyDBM_File.t 2 512 12 2 16.67% 1 4
316 \& ../lib/Memoize/t/errors.t 0 139 11 5 45.45% 7\-11
317 \& ../lib/Memoize/t/tie_ndbm.t 13 3328 4 4 100.00% 1\-4
318 \& run/fresh_perl.t 97 1 1.03% 91
319 .Ve
320 .PP
321 If you intend to run only on FAT (or if using AnyDBM_File on FAT),
322 run Configure with the \-Ui_ndbm and \-Ui_dbm options to prevent
323 NDBM_File and ODBM_File being built.
324 .PP
325 With NTFS (and no CYGWIN=nontsec), there should be no problems even if
326 perl was built on FAT.
327 .ie n .SS "fork() failures in io_* tests"
328 .el .SS "\f(CWfork()\fP failures in io_* tests"
329 .IX Subsection "fork() failures in io_* tests"
330 A \f(CWfork()\fR failure may result in the following tests failing:
331 .PP
332 .Vb 3
333 \& ext/IO/lib/IO/t/io_multihomed.t
334 \& ext/IO/lib/IO/t/io_sock.t
335 \& ext/IO/lib/IO/t/io_unix.t
336 .Ve
337 .PP
338 See comment on fork in "Miscellaneous" below.
339 .SH "Specific features of the Cygwin port"
340 .IX Header "Specific features of the Cygwin port"
341 .SS "Script Portability on Cygwin"
342 .IX Subsection "Script Portability on Cygwin"
343 Cygwin does an outstanding job of providing UNIX\-like semantics on top of
344 Win32 systems. However, in addition to the items noted above, there are
345 some differences that you should know about. This is a very brief guide
346 to portability, more information can be found in the Cygwin documentation.
347 .IP \(bu 4
348 Pathnames
349 .Sp
350 Cygwin pathnames are separated by forward (\fI/\fR) slashes, Universal
351 Naming Codes (\fI//UNC\fR) are also supported. Since cygwin\-1.7 non\-POSIX
352 pathnames should not be used. Names may contain all printable
353 characters.
354 .Sp
355 File names are case insensitive, but case preserving. A pathname that
356 contains a backslash or drive letter is a Win32 pathname, and not
357 subject to the translations applied to POSIX style pathnames, but
358 cygwin will warn you, so better convert them to POSIX.
359 .Sp
360 For conversion we have \f(CWCygwin::win_to_posix_path()\fR and
361 \&\f(CWCygwin::posix_to_win_path()\fR.
362 .Sp
363 Since cygwin\-1.7 pathnames are UTF\-8 encoded.
364 .IP \(bu 4
365 Text/Binary
366 .Sp
367 Since cygwin\-1.7 textmounts are deprecated and strongly discouraged.
368 .Sp
369 When a file is opened it is in either text or binary mode. In text mode
370 a file is subject to CR/LF/Ctrl\-Z translations. With Cygwin, the default
371 mode for an \f(CWopen()\fR is determined by the mode of the mount that underlies
372 the file. See "Cygwin::is_binmount"(). Perl provides a \f(CWbinmode()\fR function
373 to set binary mode on files that otherwise would be treated as text.
374 \&\f(CWsysopen()\fR with the \f(CW\*(C`O_TEXT\*(C'\fR flag sets text mode on files that otherwise
375 would be treated as binary:
376 .Sp
377 .Vb 1
378 \& sysopen(FOO, "bar", O_WRONLY|O_CREAT|O_TEXT)
379 .Ve
380 .Sp
381 \&\f(CWlseek()\fR, \f(CWtell()\fR and \f(CWsysseek()\fR only work with files opened in binary
382 mode.
383 .Sp
384 The text/binary issue is covered at length in the Cygwin documentation.
385 .IP \(bu 4
386 PerlIO
387 .Sp
388 PerlIO overrides the default Cygwin Text/Binary behaviour. A file will
389 always be treated as binary, regardless of the mode of the mount it lives
390 on, just like it is in UNIX. So CR/LF translation needs to be requested in
391 either the \f(CWopen()\fR call like this:
392 .Sp
393 .Vb 1
394 \& open(FH, ">:crlf", "out.txt");
395 .Ve
396 .Sp
397 which will do conversion from LF to CR/LF on the output, or in the
398 environment settings (add this to your .bashrc):
399 .Sp
400 .Vb 1
401 \& export PERLIO=crlf
402 .Ve
403 .Sp
404 which will pull in the crlf PerlIO layer which does LF \-> CRLF conversion
405 on every output generated by perl.
406 .IP \(bu 4
407 \&\fI.exe\fR
408 .Sp
409 The Cygwin \f(CWstat()\fR, \f(CWlstat()\fR and \f(CWreadlink()\fR functions make the \fI.exe\fR
410 extension transparent by looking for \fIfoo.exe\fR when you ask for \fIfoo\fR
411 (unless a \fIfoo\fR also exists). Cygwin does not require a \fI.exe\fR
412 extension, but \fIgcc\fR adds it automatically when building a program.
413 However, when accessing an executable as a normal file (e.g., \fIcp\fR
414 in a makefile) the \fI.exe\fR is not transparent. The \fIinstall\fR program
415 included with Cygwin automatically appends a \fI.exe\fR when necessary.
416 .IP \(bu 4
417 Cygwin vs. Windows process ids
418 .Sp
419 Cygwin processes have their own pid, which is different from the
420 underlying windows pid. Most posix compliant Proc functions expect
421 the cygwin pid, but several Win32::Process functions expect the
422 winpid. E.g. \f(CW$$\fR is the cygwin pid of \fI/usr/bin/perl\fR, which is not
423 the winpid. Use \f(CWCygwin::pid_to_winpid()\fR and \f(CWCygwin::winpid_to_pid()\fR
424 to translate between them.
425 .IP \(bu 4
426 Cygwin vs. Windows errors
427 .Sp
428 Under Cygwin, $^E is the same as $!. When using Win32 API Functions,
429 use \f(CWWin32::GetLastError()\fR to get the last Windows error.
430 .IP \(bu 4
431 rebase errors on fork or system
432 .Sp
433 Using \f(CWfork()\fR or \f(CWsystem()\fR out to another perl after loading multiple dlls
434 may result on a DLL baseaddress conflict. The internal cygwin error
435 looks like like the following:
436 .Sp
437 .Vb 2
438 \& 0 [main] perl 8916 child_info_fork::abort: data segment start:
439 \& parent (0xC1A000) != child(0xA6A000)
440 .Ve
441 .Sp
442 or:
443 .Sp
444 .Vb 4
445 \& 183 [main] perl 3588 C:\ecygwin\ebin\eperl.exe: *** fatal error \-
446 \& unable to remap C:\ecygwin\ebin\ecygsvn_subr\-1\-0.dll to same address
447 \& as parent(0x6FB30000) != 0x6FE60000 46 [main] perl 3488 fork: child
448 \& 3588 \- died waiting for dll loading, errno11
449 .Ve
450 .Sp
451 See <https://cygwin.com/faq/faq.html#faq.using.fixing\-fork\-failures>
452 It helps if not too many DLLs are loaded in memory so the available address space is larger,
453 e.g. stopping the MS Internet Explorer might help.
454 .Sp
455 +Use the rebase utilities to resolve the conflicting dll addresses.
456 The rebase package is included in the Cygwin setup. Use \fIsetup.exe\fR
457 from <https://cygwin.com/install.html> to install it.
458 .Sp
459 1. kill all perl processes and run
460 \f(CW\*(C`</bin/find <dir\*(C'\fR \-xdev \-name \e*.dll | /bin/rebase \-OT \->> or
461 .Sp
462 2. kill all cygwin processes and services, and run setup.exe.
463 .IP \(bu 4
464 Miscellaneous
465 .Sp
466 File locking using the \f(CW\*(C`F_GETLK\*(C'\fR command to \f(CWfcntl()\fR is a stub that
467 returns \f(CW\*(C`ENOSYS\*(C'\fR.
468 .Sp
469 The Cygwin \f(CWchroot()\fR implementation has holes (it can not restrict file
470 access by native Win32 programs).
471 .Sp
472 Inplace editing \f(CW\*(C`perl \-i\*(C'\fR of files doesn\*(Aqt work without doing a backup
473 of the file being edited \f(CW\*(C`perl \-i.bak\*(C'\fR because of windowish restrictions,
474 therefore Perl adds the suffix \f(CW\*(C`.bak\*(C'\fR automatically if you use \f(CW\*(C`perl \-i\*(C'\fR
475 without specifying a backup extension.
476 .SS "Prebuilt methods:"
477 .IX Subsection "Prebuilt methods:"
478 .ie n .IP """Cwd::cwd""" 4
479 .el .IP \f(CWCwd::cwd\fR 4
480 .IX Item "Cwd::cwd"
481 Returns the current working directory.
482 .ie n .IP """Cygwin::pid_to_winpid""" 4
483 .el .IP \f(CWCygwin::pid_to_winpid\fR 4
484 .IX Item "Cygwin::pid_to_winpid"
485 Translates a cygwin pid to the corresponding Windows pid (which may or
486 may not be the same).
487 .ie n .IP """Cygwin::winpid_to_pid""" 4
488 .el .IP \f(CWCygwin::winpid_to_pid\fR 4
489 .IX Item "Cygwin::winpid_to_pid"
490 Translates a Windows pid to the corresponding cygwin pid (if any).
491 .ie n .IP """Cygwin::win_to_posix_path""" 4
492 .el .IP \f(CWCygwin::win_to_posix_path\fR 4
493 .IX Item "Cygwin::win_to_posix_path"
494 Translates a Windows path to the corresponding cygwin path respecting
495 the current mount points. With a second non\-null argument returns an
496 absolute path. Double\-byte characters will not be translated.
497 .ie n .IP """Cygwin::posix_to_win_path""" 4
498 .el .IP \f(CWCygwin::posix_to_win_path\fR 4
499 .IX Item "Cygwin::posix_to_win_path"
500 Translates a cygwin path to the corresponding cygwin path respecting
501 the current mount points. With a second non\-null argument returns an
502 absolute path. Double\-byte characters will not be translated.
503 .ie n .IP Cygwin::mount_table() 4
504 .el .IP \f(CWCygwin::mount_table()\fR 4
505 .IX Item "Cygwin::mount_table()"
506 Returns an array of [mnt_dir, mnt_fsname, mnt_type, mnt_opts].
507 .Sp
508 .Vb 8
509 \& perl \-e \*(Aqfor $i (Cygwin::mount_table) {print join(" ",@$i),"\en";}\*(Aq
510 \& /bin c:\ecygwin\ebin system binmode,cygexec
511 \& /usr/bin c:\ecygwin\ebin system binmode
512 \& /usr/lib c:\ecygwin\elib system binmode
513 \& / c:\ecygwin system binmode
514 \& /cygdrive/c c: system binmode,noumount
515 \& /cygdrive/d d: system binmode,noumount
516 \& /cygdrive/e e: system binmode,noumount
517 .Ve
518 .ie n .IP """Cygwin::mount_flags""" 4
519 .el .IP \f(CWCygwin::mount_flags\fR 4
520 .IX Item "Cygwin::mount_flags"
521 Returns the mount type and flags for a specified mount point.
522 A comma\-separated string of mntent\->mnt_type (always
523 "system" or "user"), then the mntent\->mnt_opts, where
524 the first is always "binmode" or "textmode".
525 .Sp
526 .Vb 2
527 \& system|user,binmode|textmode,exec,cygexec,cygdrive,mixed,
528 \& notexec,managed,nosuid,devfs,proc,noumount
529 .Ve
530 .Sp
531 If the argument is "/cygdrive", then just the volume mount settings,
532 and the cygdrive mount prefix are returned.
533 .Sp
534 User mounts override system mounts.
535 .Sp
536 .Vb 4
537 \& $ perl \-e \*(Aqprint Cygwin::mount_flags "/usr/bin"\*(Aq
538 \& system,binmode,cygexec
539 \& $ perl \-e \*(Aqprint Cygwin::mount_flags "/cygdrive"\*(Aq
540 \& binmode,cygdrive,/cygdrive
541 .Ve
542 .ie n .IP """Cygwin::is_binmount""" 4
543 .el .IP \f(CWCygwin::is_binmount\fR 4
544 .IX Item "Cygwin::is_binmount"
545 Returns true if the given cygwin path is binary mounted, false if the
546 path is mounted in textmode.
547 .ie n .IP """Cygwin::sync_winenv""" 4
548 .el .IP \f(CWCygwin::sync_winenv\fR 4
549 .IX Item "Cygwin::sync_winenv"
550 Cygwin does not initialize all original Win32 environment variables.
551 See the bottom of this page <https://cygwin.com/cygwin\-ug\-net/setup\-env.html>
552 for "Restricted Win32 environment".
553 .Sp
554 Certain Win32 programs called from cygwin programs might need some environment
555 variable, such as e.g. ADODB needs \f(CW%COMMONPROGRAMFILES\fR%.
556 Call \fBCygwin::sync_winenv()\fR to copy all Win32 environment variables to your
557 process and note that cygwin will warn on every encounter of non\-POSIX paths.
558 .SH "INSTALL PERL ON CYGWIN"
559 .IX Header "INSTALL PERL ON CYGWIN"
560 This will install Perl, including \fIman\fR pages.
561 .PP
562 .Vb 1
563 \& make install 2>&1 | tee log.make\-install
564 .Ve
565 .PP
566 NOTE: If \f(CW\*(C`STDERR\*(C'\fR is redirected \f(CW\*(C`make install\*(C'\fR will \fBnot\fR prompt
567 you to install \fIperl\fR into \fI/usr/bin\fR.
568 .PP
569 You may need to be \fIAdministrator\fR to run \f(CW\*(C`make install\*(C'\fR. If you
570 are not, you must have write access to the directories in question.
571 .PP
572 Information on installing the Perl documentation in HTML format can be
573 found in the \fIINSTALL\fR document.
574 .SH "MANIFEST ON CYGWIN"
575 .IX Header "MANIFEST ON CYGWIN"
576 These are the files in the Perl release that contain references to Cygwin.
577 These very brief notes attempt to explain the reason for all conditional
578 code. Hopefully, keeping this up to date will allow the Cygwin port to
579 be kept as clean as possible.
580 .IP Documentation 4
581 .IX Item "Documentation"
582 .Vb 10
583 \& INSTALL README.cygwin README.win32 MANIFEST
584 \& pod/perl.pod pod/perlport.pod pod/perlfaq3.pod
585 \& pod/perldelta.pod pod/perl5004delta.pod pod/perl56delta.pod
586 \& pod/perl561delta.pod pod/perl570delta.pod pod/perl572delta.pod
587 \& pod/perl573delta.pod pod/perl58delta.pod pod/perl581delta.pod
588 \& pod/perl590delta.pod pod/perlhist.pod pod/perlmodlib.pod
589 \& pod/perltoc.pod Porting/Glossary pod/perlgit.pod
590 \& Porting/updateAUTHORS.pl
591 \& dist/Cwd/Changes ext/Compress\-Raw\-Zlib/Changes
592 \& dist/Time\-HiRes/Changes
593 \& ext/Compress\-Raw\-Zlib/README ext/Compress\-Zlib/Changes
594 \& ext/DB_File/Changes ext/Encode/Changes ext/Sys\-Syslog/Changes
595 \& ext/Win32API\-File/Changes
596 \& lib/ExtUtils/CBuilder/Changes lib/ExtUtils/Changes
597 \& lib/ExtUtils/NOTES lib/ExtUtils/PATCHING lib/ExtUtils/README
598 \& lib/Net/Ping/Changes lib/Test/Harness/Changes
599 \& lib/Term/ANSIColor/ChangeLog lib/Term/ANSIColor/README
600 .Ve
601 .IP "Build, Configure, Make, Install" 4
602 .IX Item "Build, Configure, Make, Install"
603 .Vb 10
604 \& cygwin/Makefile.SHs
605 \& ext/IPC/SysV/hints/cygwin.pl
606 \& ext/NDBM_File/hints/cygwin.pl
607 \& ext/ODBM_File/hints/cygwin.pl
608 \& hints/cygwin.sh
609 \& Configure \- help finding hints from uname,
610 \& shared libperl required for dynamic loading
611 \& Makefile.SH Cross/Makefile\-cross\-SH
612 \& \- linklibperl
613 \& Porting/patchls \- cygwin in port list
614 \& installman \- man pages with :: translated to .
615 \& installperl \- install dll, install to \*(Aqpods\*(Aq
616 \& makedepend.SH \- uwinfix
617 \& regen_lib.pl \- file permissions
618 \&
619 \& plan9/mkfile
620 \& vms/descrip_mms.template
621 \& win32/Makefile
622 .Ve
623 .IP Tests 4
624 .IX Item "Tests"
625 .Vb 10
626 \& t/io/fs.t \- no file mode checks if not ntsec
627 \& skip rename() check when not
628 \& check_case:relaxed
629 \& t/io/tell.t \- binmode
630 \& t/lib/cygwin.t \- builtin cygwin function tests
631 \& t/op/groups.t \- basegroup has ID = 0
632 \& t/op/magic.t \- $^X/symlink WORKAROUND, s/.exe//
633 \& t/op/stat.t \- no /dev, skip Win32 ftCreationTime quirk
634 \& (cache manager sometimes preserves ctime of
635 \& file previously created and deleted), no \-u
636 \& (setuid)
637 \& t/op/taint.t \- can\*(Aqt use empty path under Cygwin Perl
638 \& t/op/time.t \- no tzset()
639 .Ve
640 .IP "Compiled Perl Source" 4
641 .IX Item "Compiled Perl Source"
642 .Vb 10
643 \& EXTERN.h \- _\|_declspec(dllimport)
644 \& XSUB.h \- _\|_declspec(dllexport)
645 \& cygwin/cygwin.c \- os_extras (getcwd, spawn, and several
646 \& Cygwin:: functions)
647 \& perl.c \- os_extras, \-i.bak
648 \& perl.h \- binmode
649 \& doio.c \- win9x can not rename a file when it is open
650 \& pp_sys.c \- do not define h_errno, init
651 \& _pwent_struct.pw_comment
652 \& util.c \- use setenv
653 \& util.h \- PERL_FILE_IS_ABSOLUTE macro
654 \& pp.c \- Comment about Posix vs IEEE math under
655 \& Cygwin
656 \& perlio.c \- CR/LF mode
657 \& perliol.c \- Comment about EXTCONST under Cygwin
658 .Ve
659 .IP "Compiled Module Source" 4
660 .IX Item "Compiled Module Source"
661 .Vb 10
662 \& ext/Compress\-Raw\-Zlib/Makefile.PL
663 \& \- Can\*(Aqt install via CPAN shell under Cygwin
664 \& ext/Compress\-Raw\-Zlib/zlib\-src/zutil.h
665 \& \- Cygwin is Unix\-like and has vsnprintf
666 \& ext/Errno/Errno_pm.PL \- Special handling for Win32 Perl under
667 \& Cygwin
668 \& ext/POSIX/POSIX.xs \- tzname defined externally
669 \& ext/SDBM_File/sdbm/pair.c
670 \& \- EXTCONST needs to be redefined from
671 \& EXTERN.h
672 \& ext/SDBM_File/sdbm/sdbm.c
673 \& \- binary open
674 \& ext/Sys/Syslog/Syslog.xs
675 \& \- Cygwin has syslog.h
676 \& ext/Sys/Syslog/win32/compile.pl
677 \& \- Convert paths to Windows paths
678 \& ext/Time\-HiRes/HiRes.xs
679 \& \- Various timers not available
680 \& ext/Time\-HiRes/Makefile.PL
681 \& \- Find w32api/windows.h
682 \& ext/Win32/Makefile.PL \- Use various libraries under Cygwin
683 \& ext/Win32/Win32.xs \- Child dir and child env under Cygwin
684 \& ext/Win32API\-File/File.xs
685 \& \- _open_osfhandle not implemented under
686 \& Cygwin
687 \& ext/Win32CORE/Win32CORE.c
688 \& \- _\|_declspec(dllexport)
689 .Ve
690 .IP "Perl Modules/Scripts" 4
691 .IX Item "Perl Modules/Scripts"
692 .Vb 10
693 \& ext/B/t/OptreeCheck.pm \- Comment about stderr/stdout order under
694 \& Cygwin
695 \& ext/Digest\-SHA/bin/shasum
696 \& \- Use binary mode under Cygwin
697 \& ext/Sys/Syslog/win32/Win32.pm
698 \& \- Convert paths to Windows paths
699 \& ext/Time\-HiRes/HiRes.pm
700 \& \- Comment about various timers not available
701 \& ext/Win32API\-File/File.pm
702 \& \- _open_osfhandle not implemented under
703 \& Cygwin
704 \& ext/Win32CORE/Win32CORE.pm
705 \& \- History of Win32CORE under Cygwin
706 \& lib/Cwd.pm \- hook to internal Cwd::cwd
707 \& lib/ExtUtils/CBuilder/Platform/cygwin.pm
708 \& \- use gcc for ld, and link to libperl.dll.a
709 \& lib/ExtUtils/CBuilder.pm
710 \& \- Cygwin is Unix\-like
711 \& lib/ExtUtils/Install.pm \- Install and rename issues under Cygwin
712 \& lib/ExtUtils/MM.pm \- OS classifications
713 \& lib/ExtUtils/MM_Any.pm \- Example for Cygwin
714 \& lib/ExtUtils/MakeMaker.pm
715 \& \- require MM_Cygwin.pm
716 \& lib/ExtUtils/MM_Cygwin.pm
717 \& \- canonpath, cflags, manifypods, perl_archive
718 \& lib/File/Fetch.pm \- Comment about quotes using a Cygwin example
719 \& lib/File/Find.pm \- on remote drives stat() always sets
720 \& st_nlink to 1
721 \& lib/File/Spec/Cygwin.pm \- case_tolerant
722 \& lib/File/Spec/Unix.pm \- preserve //unc
723 \& lib/File/Spec/Win32.pm \- References a message on cygwin.com
724 \& lib/File/Spec.pm \- Pulls in lib/File/Spec/Cygwin.pm
725 \& lib/File/Temp.pm \- no directory sticky bit
726 \& lib/Module/CoreList.pm \- List of all module files and versions
727 \& lib/Net/Domain.pm \- No domainname command under Cygwin
728 \& lib/Net/Netrc.pm \- Bypass using stat() under Cygwin
729 \& lib/Net/Ping.pm \- ECONREFUSED is EAGAIN under Cygwin
730 \& lib/Pod/Find.pm \- Set \*(Aqpods\*(Aq dir
731 \& lib/Pod/Perldoc/ToMan.pm \- \*(Aq\-c\*(Aq switch for pod2man
732 \& lib/Pod/Perldoc.pm \- Use \*(Aqless\*(Aq pager, and use .exe extension
733 \& lib/Term/ANSIColor.pm \- Cygwin terminal info
734 \& lib/perl5db.pl \- use stdin not /dev/tty
735 \& utils/perlbug.PL \- Add CYGWIN environment variable to report
736 .Ve
737 .IP "Perl Module Tests" 4
738 .IX Item "Perl Module Tests"
739 .Vb 10
740 \& dist/Cwd/t/cwd.t
741 \& ext/Compress\-Zlib/t/14gzopen.t
742 \& ext/DB_File/t/db\-btree.t
743 \& ext/DB_File/t/db\-hash.t
744 \& ext/DB_File/t/db\-recno.t
745 \& ext/DynaLoader/t/DynaLoader.t
746 \& ext/File\-Glob/t/basic.t
747 \& ext/GDBM_File/t/gdbm.t
748 \& ext/POSIX/t/sysconf.t
749 \& ext/POSIX/t/time.t
750 \& ext/SDBM_File/t/sdbm.t
751 \& ext/Sys/Syslog/t/syslog.t
752 \& ext/Time\-HiRes/t/HiRes.t
753 \& ext/Win32/t/Unicode.t
754 \& ext/Win32API\-File/t/file.t
755 \& ext/Win32CORE/t/win32core.t
756 \& lib/AnyDBM_File.t
757 \& lib/Archive/Extract/t/01_Archive\-Extract.t
758 \& lib/Archive/Tar/t/02_methods.t
759 \& lib/ExtUtils/t/Embed.t
760 \& lib/ExtUtils/t/eu_command.t
761 \& lib/ExtUtils/t/MM_Cygwin.t
762 \& lib/ExtUtils/t/MM_Unix.t
763 \& lib/File/Compare.t
764 \& lib/File/Copy.t
765 \& lib/File/Find/t/find.t
766 \& lib/File/Path.t
767 \& lib/File/Spec/t/crossplatform.t
768 \& lib/File/Spec/t/Spec.t
769 \& lib/Net/hostent.t
770 \& lib/Net/Ping/t/110_icmp_inst.t
771 \& lib/Net/Ping/t/500_ping_icmp.t
772 \& lib/Net/t/netrc.t
773 \& lib/Pod/Simple/t/perlcyg.pod
774 \& lib/Pod/Simple/t/perlcygo.txt
775 \& lib/Pod/Simple/t/perlfaq.pod
776 \& lib/Pod/Simple/t/perlfaqo.txt
777 \& lib/User/grent.t
778 \& lib/User/pwent.t
779 .Ve
780 .SH "BUGS ON CYGWIN"
781 .IX Header "BUGS ON CYGWIN"
782 Support for swapping real and effective user and group IDs is incomplete.
783 On WinNT Cygwin provides \f(CWsetuid()\fR, \f(CWseteuid()\fR, \f(CWsetgid()\fR and \f(CWsetegid()\fR.
784 However, additional Cygwin calls for manipulating WinNT access tokens
785 and security contexts are required.
786 .SH AUTHORS
787 .IX Header "AUTHORS"
788 Charles Wilson <[email protected]>,
789 Eric Fifer <[email protected]>,
790 alexander smishlajev <[email protected]>,
791 Steven Morlock <[email protected]>,
792 Sebastien Barre <[email protected]>,
793 Teun Burgers <[email protected]>,
794 Gerrit P. Haase <[email protected]>,
795 Reini Urban <[email protected]>,
796 Jan Dubois <[email protected]>,
797 Jerry D. Hedden <[email protected]>.
798 .SH HISTORY
799 .IX Header "HISTORY"
800 Last updated: 2019\-11\-14