Nikodemus Siivola | 18 Jun 21:54 2015
Picon

Osicat/github

I'd quite forgotten that Osicat had moved to github, and pushed a commit on

  https://gitlab.common-lisp.net/osicat/osicat

. Oops. There's a corresponding pull request on github.

Cheers,

 -- nikodemus

Massimiliano Ghilardi | 26 Dec 17:06 2014
Picon

[Osicat-devel] patch adding wrappers for C macros WIFEXITED(), WEXITSTATUS() ...

Hello,

I noticed osicat-posix is missing wrappers for WIFEXITED(), 
WEXITSTATUS() and other C macros needed to inspect the return value of 
wait() and waitpid().

In attachment a patch to define them - please let me know if it's good 
as it is or it needs improvements/cleanups.

Regards,

Massimiliano Ghilardi

Attachment (osicat-wait-macros.diff): text/x-patch, 1902 bytes
_______________________________________________
Osicat-devel mailing list
Osicat-devel <at> common-lisp.net
http://mailman.common-lisp.net/cgi-bin/mailman/listinfo/osicat-devel
Luís Oliveira | 23 Dec 02:46 2014
Picon

[Osicat-devel] Travis CI and Osicat 0.7.0

Hello Osicat users and developers,

I've set up Travis CI for the osicat repository at
<https://github.com/osicat/osicat>. In the process of doing that, I
noticed that CCL fd-streams were broken so I removed them.

Also released 0.7.0, which was long overdue. :-)

Cheers,

--

-- 
Luís Oliveira
http://kerno.org/~luis/

_______________________________________________
Osicat-devel mailing list
Osicat-devel <at> common-lisp.net
http://mailman.common-lisp.net/cgi-bin/mailman/listinfo/osicat-devel
Massimiliano Ghilardi | 6 Jan 22:06 2014
Picon

bug in mmap() and mremap() return value - and a fix

Running 32-bit CCL on 64-bit Linux (but it can happen in any setup),
I noticed that (osicat-posix:mmap) does not correctly handle return
addresses larger than the maximum C "long" value, but instead throws
an exception.

In such cases, it means the underlying C mmap() function returned
successfully a pointer in the top half of the addressable virtual
memory, but the Lisp wrapper for mmap() and mremap() chokes on such 
pointers.

A patch that solves this problem is attached.

Feedback on the analysis and the solution is welcome :)

Best regards,

Massimiliano Ghilardi

------------------ longer explanation -----------------------------

While invoking

(osicat-posix:mmap (cffi-sys:null-pointer) 4096
             (logior osicat-posix:prot-read osicat-posix:prot-write)
             osicat-posix:map-shared
             *fd* 0)

with a file descriptor *fd* correctly open on a 4096-byte file,
I encountered the error:
-------------------------------------------------------------------
(Continue reading)

John Morrison | 31 Dec 02:11 2013

colons in pathnames - SBCL vs CCL

Ran into CCL (but not SBCL) choking on filenames that contain colons (it interprets them as logical hosts, regardless of the fact they're not recognized ones -- and in contravention of the CLHS?).  

Seems like the divergence in behavior between CCL and SBCL is in merge-pathnames - below the level of osicat.

My perhaps naive and overly simplistic expectation of behavior is that of SBCL (not choking, arguably closer adherence to CLHS).

[jm <at> jm7 ~]$ lx86cl64
Welcome to Clozure Common Lisp Version 1.9-r15870 (LinuxX8664)!
? (merge-pathnames "foo:bar" #P"" :newest)
> Error: "foo" is not a defined logical host
> While executing: CCL::PATHNAME-HOST-SSTR, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > (apropos "host-translations")
CCL::%LOGICAL-HOST-TRANSLATIONS%, Value: (("ccl" (#P"ccl:l1;**;*.*" #P"ccl:level-1;**;*.*") (#P"ccl:l1f;**;*.*" #P"ccl:l1-fasls;**;*.*") (#P"ccl:ccl;*.*" #P"/opt/ccl/*.*") (#P"ccl:**;*.*" #P"/opt/ccl/**/*.*")) ("home" (#P"home:**;*.*" #P"/home/jm/**/*.*")))

Found this when rehabbing the ancient CLIM "indented-lists" tree widget, replacing the buggy (in CCL again) pathname hackery therein with osicat (which cleaned up the code).  Turns out dbus/dcop create these files/symlinks in one's home directory, so it's not like I went looking for corner cases...  If possible, I would of course prefer to be able to rely on osicat or the like to insulate me from system or implementation-dependent behavior.  Does anybody have any guidance?

Thanks in advance.

-jm

Max Rottenkolber | 11 May 21:15 2013

osicat:native-namestring undocumented.

Hi,

I was about to write a portable NATIVE-NAMESTRING function when I noticed
the package conflict with OSICAT. Since I don't have texinfo-docstrings I
can only guess what's missing so here is a diff:

diff --git a/doc/osicat.texinfo b/doc/osicat.texinfo
index 53df0bf..05965de 100644
--- a/doc/osicat.texinfo
+++ b/doc/osicat.texinfo
 <at>  <at>  -99,6 +99,7  <at>  <at> 
  <at> include include/macro-osicat-with-temporary-file.texinfo
  <at> include include/fun-osicat-make-link.texinfo
  <at> include include/fun-osicat-read-link.texinfo
+ <at> include include/fun-osicat-native-namestring.texinfo

  <at> node Users
  <at> section Users

Cheers,
max

Luís Oliveira | 15 Jul 03:57 2012
Picon

Re: [osicat-devel] bug in UNMERGE-PATHNAMES when called with #P

On Mon, Jul 2, 2012 at 5:09 PM,  <max <at> mr.gy> wrote:
> I understand now. You are right it's not a bug. Instead of having arbitrary no-op behaviour, signalling
errors forces the programmer to
> be explicit.

Yeah, when in doubt I tend to go that way. I thought about this a
little bit more; the argument for the no-op behaviour is that it would
make unmerge-pathnames work more like the inverse of merge-pathnames,
which has no trouble mixing relative and absolute pathnames. But that
just makes it clear that unmerge-pathnames is a misnomer, since it
only deals with directories and ignores other components. A better
name for this function would perhaps reflect its similarities with
enough-namestring.

Another problem with unmerge-pathnames only taking the directory
component into account is that it fails to do the right thing on
Windows, where the device component is particularly relevant for this
operation.

Do you feel like taking a stab at these issues?

Cheers,

--

-- 
Luís Oliveira
http://r42.eu/~luis/

_______________________________________________
pg-cvs site list
pg-cvs <at> common-lisp.net
http://common-lisp.net/mailman/listinfo/pg-cvs

max | 22 Jun 03:01 2012

[osicat-devel] bug in UNMERGE-PATHNAMES when called with #P"" for second argument

Hi,

I believe UNMERGE-PATHNAMES should not signal an error if called with #P"" as its
second
argument. Instead it should return its first argument.

I attached a possible bugfix.

Cheers,
max 

Attachment (unmerge-pathnames-fixed.lisp): application/octet-stream, 713 bytes
_______________________________________________
pg-cvs site list
pg-cvs <at> common-lisp.net
http://common-lisp.net/mailman/listinfo/pg-cvs
Vladimir Sedach | 16 Apr 01:29 2012
Picon

[osicat-devel] Unicode error for Clozure when calling osicat-posix:mkdir on existing directory

I get a strange error when calling osicat-posix:mkdir on an already
existing directory in Clozure.

(osicat-posix:mkdir "/this/directory/exists/" #o777)

An error is thrown:

--------------------------------------------

#<error printing EEXIST #x1985838E>
   [Condition of type OSICAT-POSIX:EEXIST]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT-BREAK] Reset this thread
 3: [ABORT] Kill this thread

Backtrace:
  0: (OSICAT-POSIX:POSIX-ERROR 17 NIL OSICAT-POSIX:MKDIR)
  1: (CCL::CALL-CHECK-REGS OSICAT-POSIX:MKDIR #P"/home/viper/tmp/bar/" 511)
  2: (CCL::CHEAP-EVAL (OSICAT-POSIX:MKDIR (MERGE-PATHNAMES "bar/"
"/home/viper/tmp/") 511))
  3: (SWANK::EVAL-REGION "(osicat-posix:mkdir (merge-pathnames
\"bar/\" \"/home/viper/tmp/\") #o777)\n")

--------------------------------------------

Select restart 1 (abort), another error comes up:

--------------------------------------------

Illegal :UTF-8 character starting at position 0.
   [Condition of type BABEL-ENCODINGS:INVALID-UTF8-STARTER-BYTE]

Restarts:
 0: [*ABORT] Return to SLIME's top level.
 1: [ABORT-BREAK] Reset this thread
 2: [ABORT] Kill this thread

Backtrace:
  0: (BABEL-ENCODINGS::UTF-8-DECODER #<A Foreign Pointer
[stack-allocated] #x7F60D08> 0 3 "^ <at> ^ <at> ^ <at> "  0)
  1: (CFFI:FOREIGN-STRING-TO-LISP #<A Foreign Pointer
[stack-allocated] #x7F60D08> :OFFSET 0 :COUNT NIL :MAX-CHARS 16777215
:ENCODING :UTF-8)
  2: (OSICAT-POSIX:STRERROR 17)
  3: ((:INTERNAL (PRINT-OBJECT (OSICAT-POSIX:POSIX-ERROR T))))
  4: (CCL::%PRINT-UNREADABLE-OBJECT #<EEXIST #<error printing
OSICAT-POSIX:EEXIST #x19797F2E> #<STRING-OUTPUT-STREAM  #x1979BB66> T
NIL #<COMPILED-LEXICAL-CLOSURE (:INTERNAL ..))
  5: (#<STANDARD-METHOD PRINT-OBJECT (OSICAT-POSIX:POSIX-ERROR T)>
#<EEXIST #<error printing OSICAT-POSIX:EEXIST #x19797F2E>
#<STRING-OUTPUT-STREAM  #x1979BB66>)
  6: (CCL::%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD PRINT-OBJECT
(OSICAT-POSIX:POSIX-ERROR T)> . 4670269))
  7: (CCL::%%STANDARD-COMBINED-METHOD-DCODE
(#<CCL::STANDARD-KERNEL-METHOD PRINT-OBJECT :AROUND (T T)>
#<STANDARD-METHOD PRINT-OBJECT (OSICAT-POSIX:POSIX-ERROR T)>) 4670269)
  8: (NIL #<Unknown Arguments>)
  9: (CCL::WRITE-A-FROB #<EEXIST #<error printing OSICAT-POSIX:EEXIST
#x19797F2E> #<STRING-OUTPUT-STREAM  #x1979BB66> 536870911 NIL)
 10: (CCL::WRITE-INTERNAL #<STRING-OUTPUT-STREAM  #x1979BB66> #<EEXIST
#<error printing OSICAT-POSIX:EEXIST #x19797F2E> 536870911 NIL)
 11: (CCL::WRITE-1 #<EEXIST #<error printing OSICAT-POSIX:EEXIST
#x19797F2E> #<STRING-OUTPUT-STREAM  #x1979BB66> 536870911)
 12: (PRIN1 #<EEXIST #<error printing OSICAT-POSIX:EEXIST #x19797F2E>
#<STRING-OUTPUT-STREAM  #x1979BB66>)
 13: (PRIN1-TO-STRING #<EEXIST #<error printing OSICAT-POSIX:EEXIST #x19797F2E>)
 14: (SWANK:EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(osicat-posix:mkdir
(merge-pathnames \"bar/\" \"/home/viper/tmp/\") #o777)\n")
"COMMON-LISP-USER" 63)

--------------------------------------------

This doesn't come up in SBCL or CLISP - they both print the EEXIST
error normally.

The environment is Clozure Version 1.9-dev-r15251M  (LinuxX8632) on
SLIME on Ubuntu, both locale and ccl:*default-file-character-encoding*
are utf-8.

Vladimir

_______________________________________________
pg-cvs site list
pg-cvs <at> common-lisp.net
http://common-lisp.net/mailman/listinfo/pg-cvs

Nicolas Martyanoff | 22 Feb 08:29 2012
Picon

[osicat-devel] prctl() support and test-related patches


Hi,

I added support for the prctl() Linux syscall to Osicat, and made two
test-related fixes.

The patches are available on my Github Osicat fork [1], more
precisely:

https://github.com/galdor/osicat/commit/736bb5c10c9c55ed76def0d58da31c1ad1eeff05
https://github.com/galdor/osicat/commit/bede645f2a3d15d825160c7518c295c95bed4271
https://github.com/galdor/osicat/commit/288dc2ee6a6861ea272ea75bb3e346cda6ca85a7

You may be interested in picking them in the official Osicat repository
:)

[1] https://github.com/galdor/osicat

Regards,

--

-- 
Nicolas Martyanoff
http://wandrian.net
khaelin <at> gmail.com

_______________________________________________
pg-cvs site list
pg-cvs <at> common-lisp.net
http://common-lisp.net/mailman/listinfo/pg-cvs

Achilles Xu | 6 Feb 10:22 2012
Picon

[osicat-devel] walk-directory does not support unicode filename and diretoryname?

It seems walk-directory will skip files and directories whose name is in Unicode, such as Chinese.


Is this a bug?

Test platform: Mac OS 10.7 Lion, Clozure Common Lisp 1.8

Test Code: 

(require "asdf")
(require "osicat")

(defpackage :com.losttemple.zip-db
  (:use :common-lisp :osicat))

(in-package :com.losttemple.zip-db)

(walk-directory
 (current-directory)
 #'(lambda (x) (format t "~a~%" (absolute-pathname x)))
 :test #'(lambda (x) (format t "---~a~%" (absolute-pathname x)) t)
 :directories :depth-first)

(in-package :common-lisp-user)
(quit)

--
---------------------------
Achilles Xu

_______________________________________________
pg-cvs site list
pg-cvs <at> common-lisp.net
http://common-lisp.net/mailman/listinfo/pg-cvs

Gmane