Permalink
Browse files

import Win32-Symlink 0.04 from CPAN

git-cpan-module:   Win32-Symlink
git-cpan-version:  0.04
git-cpan-authorid: AUTRIJUS
git-cpan-file:     authors/id/A/AU/AUTRIJUS/Win32-Symlink-0.04.tar.gz
  • Loading branch information...
Audrey Tang authored and schwern committed Oct 10, 2004
1 parent 6780a05 commit 2f8f2ff68c43b2272d1dd1016791e2f150d1481c
Showing with 264 additions and 44 deletions.
  1. +10 −22 Changes
  2. +2 −1 MANIFEST
  3. +1 −0 MANIFEST.SKIP
  4. +1 −1 META.yml
  5. 0 Makefile.PL
  6. +12 −11 SIGNATURE
  7. +12 −6 Symlink.pm
  8. +10 −0 Symlink.xs
  9. +30 −0 pgsymlink.c
  10. +4 −3 t/1-basic.t
  11. +182 −0 tclreadlink.c
View
32 Changes
@@ -1,29 +1,17 @@
-----------------------------------------------------------------------
-r8170: autrijus | 2004-09-24T23:36:28.339129Z
+[Changes for 0.03 - 2004-09-24]
-* This be 0.03.
-----------------------------------------------------------------------
-r8169: autrijus | 2004-09-24T23:35:37.686591Z
+* readlink() support, adapted from Tcl's source code.
+* Add proper copyright notices for both pgsymlink.c and tclreadlink.c.
-* Fix building on Perl 5.6.1 by providing a correct typemap.
-----------------------------------------------------------------------
-r7681: | 2004-09-18T21:38:28.263331Z
+[Changes for 0.03 - 2004-09-24]
-* fix README's isntallation procedure
-----------------------------------------------------------------------
-r7678: | 2004-09-18T21:35:26.311697Z
+* Fix building on Perl 5.6.1 by providing a correct typemap.
+* Fix the installation procedure mentioned in README.
-* 0.02, with some docs.
-----------------------------------------------------------------------
-r7677: | 2004-09-18T20:23:40.760619Z
+[Changes for 0.02 - 2004-09-18]
-* add a test.
-----------------------------------------------------------------------
-r7676: | 2004-09-18T20:15:51.075244Z
+* Added documentations and tests.
-This be 0.01.
-----------------------------------------------------------------------
-r7674: autrijus | 2004-09-18T19:41:59.869858Z
+[Changes for 0.01 - 2004-09-18]
-* Initial checkin of Win32::Symlink
-----------------------------------------------------------------------
+* Initial release to CPAN.
View
@@ -3,10 +3,11 @@ Makefile.PL
MANIFEST
MANIFEST.SKIP
META.yml Module meta-data (added by MakeMaker)
-pgsymlink.c
README
SIGNATURE
Symlink.pm
Symlink.xs
+pgsymlink.c
+tclreadlink.c
t/1-basic.t
typemap
View
@@ -7,4 +7,5 @@
^blibdirs$
^Symlink.(?!pm$|xs$).*$
^pgsymlink.(?!c$).*$
+^tclreadlink.(?!c$).*$
^.*.pdb$
View
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Win32-Symlink
-version: 0.03
+version: 0.04
version_from: Symlink.pm
installdirs: site
requires:
View
0 Makefile.PL 100755 → 100644
No changes.
View
@@ -14,21 +14,22 @@ not run its Makefile.PL or Build.PL.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 689a8dd0dabbc3f6461b85c91284a69a71ee964d Changes
-SHA1 ced7a219415331128f9ef099195fa553e9c4ab00 MANIFEST
-SHA1 f2706b567c578af20f55579e542d165672cb1988 MANIFEST.SKIP
-SHA1 a78005349f97153caa6298840dca6698dc7ec216 META.yml
+SHA1 6f58f24fe9a2b20de26953ced753c9f17bf67319 Changes
+SHA1 1e41c8c91af6e6c35dfe20948a81a1f33d99d6ae MANIFEST
+SHA1 139a826b24b3127d7a0216d3174d94af1d116543 MANIFEST.SKIP
+SHA1 76155f7b7cb37bc83dfd58925606e5de40243ef8 META.yml
SHA1 b9658d16261c77f0158b091361c68522fd681d92 Makefile.PL
SHA1 864ae8630f14a878f55ff4a8ffdf3e69080f69b7 README
-SHA1 882cd044870de852287856bc78a5dd686d2d6971 Symlink.pm
-SHA1 3e07cc67859beba9fd19731e271d9abec2b9f71e Symlink.xs
-SHA1 cf613d720ce01e4c37178d89fb36e952a268a4fe pgsymlink.c
-SHA1 c8023964246f90282f0c9ee17e3d54012a3b8dcd t/1-basic.t
+SHA1 e3a3d9a31d4b18fdfdc629fd0d1b3c842b5d5254 Symlink.pm
+SHA1 a07af5e71e48e91c126837b47491e84b37f8ab73 Symlink.xs
+SHA1 5977a9cf7d714cf1d96118a068542d16bec1c448 pgsymlink.c
+SHA1 837adeb23a5cb9bb8124fa4d075aa283d1306738 t/1-basic.t
+SHA1 c5e09c2624b21c39d766a95e7114ee5627ae45e4 tclreadlink.c
SHA1 7fefab9e3cbe37a7a900a3082ac4d454999bdb5b typemap
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
-iD8DBQFBVK+ptLPdNzw1AaARAkP+AJ0eohsbUWA3hzLUMs5WzyfBdHqSSQCaAzLX
-/ljdn7WeUpwVzmxJ/qhQ7Ac=
-=t0um
+iD8DBQFBaRintLPdNzw1AaARAuc5AJ9rd3Recof5rTmGIPvHejht0h9Y/gCfcJhP
++Wv3rDbHlLAJ7FZGcQsfzgQ=
+=S14D
-----END PGP SIGNATURE-----
View
@@ -5,12 +5,13 @@ use vars qw($VERSION @ISA);
use DynaLoader;
@ISA = qw(DynaLoader);
-$VERSION = '0.03';
+$VERSION = '0.04';
__PACKAGE__->bootstrap($VERSION);
sub import {
*CORE::GLOBAL::symlink = __PACKAGE__->can('symlink');
+ *CORE::GLOBAL::readlink = __PACKAGE__->can('readlink');
}
1;
@@ -23,18 +24,23 @@ Win32::Symlink - Symlink support on Windows
=head1 VERSION
-This document describes version 0.03 of Win32::Symlink, released
-September 25, 2004.
+This document describes version 0.04 of Win32::Symlink, released
+October 10, 2004.
=head1 SYNOPSIS
use Win32::Symlink;
- symlink( 'from' => 'to' );
+
+ # Assuming D: is a NTFS volume...
+ mkdir 'D:\from';
+ symlink( 'D:\from' => 'D:\to' );
+ print readlink( 'D:\to' ); # 'D:\from'
+ rmdir 'D:\from', 'D\to';
=head1 DESCRIPTION
-This module implements the built-in C<symlink> function for Microsoft Windows.
-Currently, it only works on NTFS filesystems.
+This module implements the built-in C<symlink> and C<readlink> functions for
+Microsoft Windows. Currently, it only works on NTFS filesystems.
=head1 SEE ALSO
View
@@ -9,6 +9,7 @@ extern "C" {
#endif
#include "pgsymlink.c"
+#include "tclreadlink.c"
MODULE = Win32::Symlink PACKAGE = Win32::Symlink
@@ -25,3 +26,12 @@ symlink(oldpath, newpath)
}
OUTPUT:
RETVAL
+
+char *
+readlink(path)
+ SV * path
+ CODE:
+ RETVAL = tclreadlink(SvPV_nolen(path));
+ OUTPUT:
+ RETVAL
+
View
@@ -1,7 +1,37 @@
/*
* Source: http://www.mail-archive.com/pgsql-committers@postgresql.org/msg03912.html
+ * Portions Copyright (c) 1996-2004, The PostgreSQL Global Development Group
+ * $PostgreSQL: pgsql-server/src/port/dirmod.c,v 1.13 2004/08/01 06:19:26 momjian Exp $
*/
+/*
+
+PostgreSQL Database Management System
+(formerly known as Postgres, then as Postgres95)
+
+Portions Copyright (c) 1996-2004, The PostgreSQL Global Development Group
+
+Portions Copyright (c) 1994, The Regents of the University of California
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose, without fee, and without a written agreement
+is hereby granted, provided that the above copyright notice and this
+paragraph and the following two paragraphs appear in all copies.
+
+IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
+DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
+LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
+DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
+PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+*/
+
#include <windows.h>
#include <winioctl.h>
#include <stdio.h>
View
@@ -1,6 +1,6 @@
use strict;
use Test;
-BEGIN { plan tests => 3 };
+BEGIN { plan tests => 4 };
use FindBin;
use File::Spec;
@@ -14,8 +14,7 @@ mkdir $foo or die $!;
my $has_symlink = eval { Win32::Symlink::symlink( $foo => "$foo.new" ) };
if (!$has_symlink) {
- skip(1);
- skip(1);
+ skip(1) for 1..3;
exit;
}
@@ -29,6 +28,8 @@ open FH, "< ".File::Spec->catfile("$foo.new", 'bar') or die $!;
ok(scalar <FH>, "TEST");
close FH;
+ok(readlink("$foo.new"), $foo);
+
END {
unlink File::Spec->catfile($foo, 'bar');
rmdir "$foo.new";
Oops, something went wrong.

0 comments on commit 2f8f2ff

Please sign in to comment.