search for: canwrite

Displaying 9 results from an estimated 9 matches for "canwrite".

Did you mean: can_write
2020 Apr 24
1
[PATCH nbdkit] golang: Pass Plugin and Connection by reference not value.
...client has connected return &MyConnection{}, nil } - func (c MyConnection) GetSize() (uint64, error) { + func (c *MyConnection) GetSize() (uint64, error) { // called per-client return virtual_size, nil } @@ -106,11 +106,11 @@ unless you also implement a C<CanWrite> callback that returns true. The same applies to C<Flush> (C<CanFlush>), C<Trim> (C<CanTrim>) and C<Zero> (C<CanZero>). - func (c MyConnection) CanWrite() (bool, error) { + func (c *MyConnection) CanWrite() (bool, error) { return true, nil }...
2006 Oct 09
1
Discussion starter for package level Connection API
...pper around the related Rconnection member. int R_VfprintfConnection(int idx, const char *format, va_list ap){ Rconnection con = getConnection(idx); if (!con) return -1; /* just like fprintf(3)? */ if(!con->isopen) error(_("connection is not open")); if(!con->canwrite) error(_("cannot write to this connection")); return con->vfprintf(con,format,ap); } int R_FgetcConnection(int idx){ Rconnection con = getConnection(idx); if (!con) return EOF; /* just like fgetc(3)? */ if(!con->isopen) error(_("connection is not open&qu...
2018 Aug 21
7
[lld] avoid emitting PLT entries for ifuncs
...Sec, RelExpr Expr, RelType Type, Sec.Relocations.push_back({Expr, Type, Offset, Addend, &Sym}); return; } + if (Sym.isGnuIFunc() && Config->ZIfuncnoplt) { + InX::RelaDyn->addReloc(Type, &Sec, Offset, &Sym, Addend, R_ADDEND, Type); + return; + } bool CanWrite = (Sec.Flags & SHF_WRITE) || !Config->ZText; if (CanWrite) { // R_GOT refers to a position in the got, even if the symbol is preemptible. @@ -977,7 +985,7 @@ static void scanReloc(InputSectionBase &Sec, OffsetGetter &GetOffset, RelTy *&I, // all dynamic symbols that ca...
2003 May 23
1
Opening a file in mode "r+" or "r+b"
...all the other modes work well, so looked at the source code. If I'm not mistaken line 247 in connections.c should be changed from if(mlen >= 2 && con->mode[1] == '+') con->canread = TRUE; to if(mlen >= 2 && con->mode[1] == '+') con->canwrite = TRUE; This explained my earlier R script tests, ie that the only way to write to a file is to truncate it ("w"/"w+" flag) or by appending to it ("a"/"ab"). Regards, Laurens > -----Original Message----- > From: Laurens Leerink > Sent: Friday,...
2009 Nov 25
0
[LLVMdev] [llvm-commits] [llvm] r89765 - in /llvm/trunk: include/llvm/System/Path.h lib/System/Unix/Path.inc lib/System/Win32/Path.inc
...==================================================== >>> --- llvm/trunk/include/llvm/System/Path.h (original) >>> +++ llvm/trunk/include/llvm/System/Path.h Tue Nov 24 09:19:10 2009 >>> @@ -380,6 +380,11 @@ >>>       /// in the file system. >>>       bool canWrite() const; >>> >>> +      /// This function checks that what we're trying to work only on a regular file or Dir. >>> +      /// Check for things like /dev/null, any block special file, >>> +      /// or other things that aren't "regular" files. &g...
2001 Feb 17
4
Comments on R-1.2.1 builds (PR#851)
...------------------------------------- c89 -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -OPT:IEEE_NaN_inf=ON -g -c connections.c -o connections.o cc-1185 c89: WARNING File = connections.c, Line = 127 An enumerated type is mixed with another type. con->canwrite = (con->mode[0] == 'w' || con->mode[0] == 'a'); ^ cc-1185 c89: WARNING File = connections.c, Line = 128 An enumerated type is mixed with another type. con->canread = !con->canwrite; ^ cc-1185 c89: WARNING File = connectio...
2012 Jan 25
26
[PATCH v4 00/23] Xenstore stub domain
Changes from v3: - mini-os configuration files moved into stubdom/ - mini-os extra console support now a config option - Fewer #ifdefs - grant table setup uses hypercall bounce - Xenstore stub domain syslog support re-enabled Changes from v2: - configuration support added to mini-os build system - add mini-os support for conditionally compiling frontends, xenbus -
2005 Aug 22
2
RFC: "loop connections"
...iption) + 1); if(!new->description) { free(new->class); free(new); - error(_("allocation of text connection failed")); + error(_("allocation of loop connection failed")); } init_con(new, description, "r"); new->isopen = TRUE; new->canwrite = FALSE; - new->open = &text_open; - new->close = &text_close; - new->destroy = &text_destroy; - new->fgetc = &text_fgetc; - new->seek = &text_seek; - new->private = (void*) malloc(sizeof(struct textconn)); + new->open = &loop_open;...
2005 Sep 18
0
Updated rawConnection() patch
...*) malloc(strlen(description) + 1); - if(!new->description) { - free(new->class); free(new); - error(_("allocation of text connection failed")); - } + if(!new->description) goto f3; init_con(new, description, "r"); new->isopen = TRUE; new->canwrite = FALSE; new->open = &text_open; new->close = &text_close; new->destroy = &text_destroy; - new->fgetc = &text_fgetc; new->seek = &text_seek; new->private = (void*) malloc(sizeof(struct textconn)); - if(!new->private) { - free(n...