Changeset 50962


Ignore:
Timestamp:
May 14, 2009, 6:34:38 AM (11 years ago)
Author:
toby@…
Message:

remove mkfifo, also unused
also fix test target

Location:
trunk/base/src/pextlib1.0
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/pextlib1.0/Makefile

    r49347 r50962  
    1818
    1919test:: ${SHLIB_NAME}
     20        ${TCLSH} tests/checksums.tcl ${SHLIB_NAME}
    2021        ${TCLSH} tests/curl.tcl ${SHLIB_NAME}
    21         ${TCLSH} tests/checksums.tcl ${SHLIB_NAME}
    2222        ${TCLSH} tests/filemap.tcl ${SHLIB_NAME}
    23         ${TCLSH} tests/fifo.tcl ${SHLIB_NAME}
    2423        ${TCLSH} tests/fs-traverse.tcl ${SHLIB_NAME}
    25         ${TCLSH} tests/socketpair.tcl ${SHLIB_NAME}
     24        ${TCLSH} tests/symlink.tcl ${SHLIB_NAME}
     25        ${TCLSH} tests/unsetenv.tcl ${SHLIB_NAME}
  • trunk/base/src/pextlib1.0/Pextlib.c

    r50960 r50962  
    810810}
    811811
    812 /**
    813  * Call mkfifo(2).
    814  * Generate a Tcl error if something wrong occurred.
    815  *
    816  * Syntax is:
    817  * mkfifo path mode
    818  */
    819 int MkfifoCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
    820 {
    821         char* path;
    822         mode_t mode;
    823 
    824         if (objc != 3) {
    825                 Tcl_WrongNumArgs(interp, 1, objv, "path mode");
    826                 return TCL_ERROR;
    827         }
    828        
    829         {
    830                 char* mode_as_char_star;
    831                 int mode_as_int;
    832                 mode_as_char_star = strdup(Tcl_GetString(objv[2]));
    833                 if (mode_as_char_star == NULL) {
    834                         return TCL_ERROR;
    835                 }
    836 
    837                 if (Tcl_GetInt(interp, mode_as_char_star, &mode_as_int) != TCL_OK) {
    838                         free(mode_as_char_star);
    839                         return TCL_ERROR;
    840                 }
    841                 free(mode_as_char_star);
    842                 mode = (mode_t) mode_as_int;
    843         }
    844 
    845         path = strdup(Tcl_GetString(objv[1]));
    846         if (path == NULL) {
    847                 return TCL_ERROR;
    848         }
    849 
    850         if (mkfifo(path, mode) != 0) {
    851                 Tcl_AppendResult(interp, "mkfifo failed: ", strerror(errno), NULL);
    852                 free(path);
    853                 return TCL_ERROR;
    854         }
    855 
    856         free(path);
    857         return TCL_OK;
    858 }
    859 
    860812int ExistsuserCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
    861813{
     
    11961148        Tcl_CreateObjCommand(interp, "umask", UmaskCmd, NULL, NULL);
    11971149        Tcl_CreateObjCommand(interp, "sudo", SudoCmd, NULL, NULL);
    1198         Tcl_CreateObjCommand(interp, "mkfifo", MkfifoCmd, NULL, NULL);
    11991150        Tcl_CreateObjCommand(interp, "pipe", PipeCmd, NULL, NULL);
    12001151        Tcl_CreateObjCommand(interp, "curl", CurlCmd, NULL, NULL);
Note: See TracChangeset for help on using the changeset viewer.