what is the functionality of `/* $Id$ */` in php-src files - php-internals

It's included in many files.
For example:
/* $Id: php_cli.c 306938 2011-01-01 02:17:06Z felipe $ */
Is this helping debug process or something else? Any tool related?

Related

freebsd NFS /etc/exports

There are 2 directory in /vol. (test1 test2)
I wish it can work like this:
/vol/test1 -ro 192.168.31.111
/vol/test2 192.168.31.111
but it got error:bad exports list line.
Is that any solution can let it work?
Thanks.
Please try to add mask to your IP.
I think file /etc/exports must be something like this:
/vol/test1 -ro -network 192.168.31.111/32
/vol/test2 192.168.31.111/32
#
You can read more on official exports manual: https://www.freebsd.org/cgi/man.cgi?query=exports

Where the "g_debug" output in GDM source code?

I want to know how gdm works, so I read the gdm source code. I saw a lot of g_debug output in the source code like this:
case SIGUSR1:
g_debug ("Got USR1 signal");
/* FIXME:
* Play with log levels or something
*/
ret = TRUE;
gdm_log_toggle_debug ();
break;
But I want to know where I can find the g_debug output.
You have to set the G_DEBUG environment variable to make GLib print out the debugging information.
Check the values in the documentation for Running and Debugging GLib Applications.
In Fedora 20, you can modify the gdm configuration file, /etc/gdm/custom.conf then add the following.
[debug]
Enable=True
Gesture=True
Then you can view the logs by typing journalctl -lr in the terminal.

Create custom ./configure command line arguments

I'm updating a project to use autotools, and to maintain backwards compatibility with previous versions, I would like the user to be able to run ./configure --foo=bar to set a build option.
Based on reading the docs, it looks like I could set up ./configure --enable-foo, ./configure --with-foo, or ./configure foo=bar without any problem, but I'm not seeing anything allowing the desired behavior (specifically having a double dash -- before the option).
Any suggestions?
There's no way I know of doing this in configure.ac. You'll have to patch configure. This can be done by running the patching script in a bootstrap.sh after running autoreconf. You'll have to add your option to the ac_option processing loop. The case for --x looks like a promising one to copy or replace to inject your new option, something like:
--foo=*)
my_foo=$ac_optarg ;;
There's also some code that strips out commandline args when configure sometimes needs to be re-invoked. It'll be up to you to determine whether --foo should be stripped or not. I think this is probably why they don't allow this in the first place.
If it were me, I'd try and lobby for AC_ARG_WITH (e.g. --with-foo=bar). It seems like a lot less work.
in order to do that you have to add to your configure.ac something like this:
# Enable debugging mode
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],[Show a lot of extra information when running]),
AM_CPPFLAGS="$AM_CPPFLAGS -DDEBUG"
debug_messages=yes,
debug_messages=no)
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_CXXFLAGS)
echo -e "\n--------- build environment -----------
Debug Mode : $debug_messages"
That is just a simple example to add for example a --enable-debug, it will set the DEBUG constant on the config.h file.
then your have to code something like this:
#include "config.h"
#ifdef DEBUG
// do debug
#else
// no debug
#endif

What does stdout in display_errors in phpinfo() mean?

I have 'stdout' under display_errors in my phpinfo.
What does it mean?
Where can I find the documentation about it?
I could not find one in http://php.net/
I read here telling that it should be off for the security reasons.
Thanks in advance.
stdout is the output stream that is used for normal output. echo "hello worl"; outputs to stdout. You can also log to file, or output to stderr. I don't think stderr is useful in the web context, but I could be wrong.
PHP Manual: php:// — Accessing various I/O streams - (PHP Wrappers)

is it possible to set per-file options for Nedit like you can do for emacs/vim

With VIM or Emacs I can put comments in the file that will be VIM's settings for that file:
/*
* Local Variables:
* mode: C
* c-basic-offset: 4
* c-indentation-style: linux
* indent-tabs-mode: nil
* default-tab-width: 8
* fill-column: 125
* End:
*
* vim: et:sw=4:ts=8:si:cindent:cino=\:0,g0,(0:
*/
Can the same be done with Nedit?
The short answer is, sadly, no.
The longer answer is (as I'm sure you're aware) yes if you wrap the call to nedit in a shell script. The script would need to look at the head of the file you're trying to open for information concerning settings. You could then spit this information out to a file and use the "--import" option to load those settings into nedit.
Hope this helps a little.
Rob

Resources