From: Michael K <vk...@ya...> - 2022-02-28 02:21:20
|
Apparently for php 8 ... - TSRMLS_CC was part of the the Thread-Safe Resource Manager, an implementation of thread-local storage used to build PHP for multi-threaded environments. It has been removed because newer mechanisms exist to do the same thing much more transparently. You can safely remove all uses of TSRMLS_* from your extension, unless you need to retain PHP 5 support. https://github.com/php/php-src/blob/PHP-8.0/UPGRADING.INTERNALS On Sunday, February 27, 2022, 09:18:01 PM EST, Michael K via Linux-gpib-general <lin...@li...> wrote: maybe a php version problem? php -vPHP 8.0.16 (cli) (built: Feb 15 2022 21:34:32) ( NTS gcc x86_64 )Copyright (c) The PHP GroupZend Engine v4.0.16, Copyright (c) Zend Technologies with Zend OPcache v8.0.16, Copyright (c), by Zend Technologies On Sunday, February 27, 2022, 09:13:20 PM EST, Michael K via Linux-gpib-general <lin...@li...> wrote: If I use "YACC=bison" on the configure that problem is solved but now I get a stack of other errors ... like gpib.c: In function ‘zif_iberr’:gpib.c:73:45: error: expected ‘)’ before ‘TSRMLS_CC’ 73 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) \ | ~ ^~~~~~~~~gpib.c:430:6: note: in expansion of macro ‘FUN_ACCESSOR’ 430 | FUN_ACCESSOR(iberr) | ^~~~~~~~~~~~gpib.c:73:7: error: too few arguments to function ‘zend_parse_parameters’ 73 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) \ | ^~~~~~~~~~~~~~~~~~~~~gpib.c:430:6: note: in expansion of macro ‘FUN_ACCESSOR’ 430 | FUN_ACCESSOR(iberr) | ^~~~~~~~~~~~In file included from /usr/include/php/main/php.h:35, from gpib.c:65:/usr/include/php/Zend/zend_API.h:304:22: note: declared here 304 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...); | ^~~~~~~~~~~~~~~~~~~~~gpib.c: In function ‘zif_ibcnt’:gpib.c:73:45: error: expected ‘)’ before ‘TSRMLS_CC’ 73 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) \ | ~ ^~~~~~~~~gpib.c:431:6: note: in expansion of macro ‘FUN_ACCESSOR’ 431 | FUN_ACCESSOR(ibcnt) | ^~~~~~~~~~~~gpib.c:73:7: error: too few arguments to function ‘zend_parse_parameters’ 73 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) \ | ^~~~~~~~~~~~~~~~~~~~~gpib.c:431:6: note: in expansion of macro ‘FUN_ACCESSOR’ 431 | FUN_ACCESSOR(ibcnt) | ^~~~~~~~~~~~In file included from /usr/include/php/main/php.h:35, from gpib.c:65:/usr/include/php/Zend/zend_API.h:304:22: note: declared here 304 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...); | ^~~~~~~~~~~~~~~~~~~~~gpib.c: In function ‘zif_ibsta’:gpib.c:73:45: error: expected ‘)’ before ‘TSRMLS_CC’ 73 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) \ | ~ ^~~~~~~~~gpib.c:432:6: note: in expansion of macro ‘FUN_ACCESSOR’ 432 | FUN_ACCESSOR(ibsta) | ^~~~~~~~~~~~ On Sunday, February 27, 2022, 09:00:41 PM EST, Michael K via Linux-gpib-general <lin...@li...> wrote: That's great but I'm now having trouble compiling the SVN. I bootstrap, configure and the make but for some odd reason the makefile generates an invalid option for yacc.Any idea whats going on here? /bin/sh /home/michael/CatLab/GPIB/linux-gpib-code/linux-gpib-user/missing yacc -Wno-yacc -d -p gpib_yy -o ./ibConfYacc.c ibConfYacc.yyacc: invalid option -- 'W'Usage: yacc [options] filename if I remove the option from the Makefile.ac I get this error when building (after bootsrat and configure) /bin/sh /home/michael/CatLab/GPIB/linux-gpib-code/linux-gpib-user/missing yacc -d -p gpib_yy -o ./ibConfYacc.c ibConfYacc.yyacc: e - line 115 of "ibConfYacc.y", syntax error%define api.pure full^ $ yacc -Vyacc - 2.0 20210328 thanks, Michael On Sunday, February 27, 2022, 12:47:55 PM EST, dave penkler <dpe...@gm...> wrote: Normally I would suggest using iblines(). But the agilent driver has a bug returning no error even if there is no board.It is fixed in the SVN and now returns ibcntl = 19 which is ENODEVHere is a log of ibtest with the "board" disconnected: $ ibtest Do you wish to open a (d)evice or an interface (b)oard? (you probably want to open a device): b enter name of interface board (or device) you wish to open: hpusb trying to open board named 'hpusb' You can: w(a)it for an event write (c)ommand bytes to bus (system controller only) send (d)evice clear (device only) change remote (e)nable line (system controller only) (g)o to standby (release ATN line, system controller only) send (i)nterface clear (system controller only) ta(k)e control (assert ATN line, system controller only) get bus (l)ine status (board only) go to local (m)ode change end (o)f transmission configuration (q)uit (r)ead string perform (s)erial poll (device only) change (t)imeout on io operations request ser(v)ice (board only) (w)rite data string send group e(x)ecute trigger (device only) : l gpib status is: ibsta = 0x8120 < ERR CMPL CIC > iberr= 0 EDVR 0: OS error ibcntl = 19 You can:... On Sun, 27 Feb 2022 at 16:43, Michael K via Linux-gpib-general <lin...@li...> wrote: I'm using an Keysight 82357B "board" (USB device).If the drivers (gpib_common and agilent_82357a) are loaded, ibfind will always find the device even after the USB device has been removed.(the drivers are loaded upon connection but do not unload when the USB device is removed)Is there a way to determine if the board is still connected using the API?_______________________________________________ Linux-gpib-general mailing list Lin...@li... https://lists.sourceforge.net/lists/listinfo/linux-gpib-general _______________________________________________ Linux-gpib-general mailing list Lin...@li... https://lists.sourceforge.net/lists/listinfo/linux-gpib-general _______________________________________________ Linux-gpib-general mailing list Lin...@li... https://lists.sourceforge.net/lists/listinfo/linux-gpib-general _______________________________________________ Linux-gpib-general mailing list Lin...@li... https://lists.sourceforge.net/lists/listinfo/linux-gpib-general |