sunshavi_ | It works for me. Even I do not have modem | 04:39 |
---|---|---|
joerg | well, echo "at+cfun=0"| pnatd - no need for nifty python. or simply pnatd; type "at+cfun=0<enter>" then close terminal or try ^C | 09:13 |
joerg | I'm not sure a stop sscd && stop csd is really useful. Basically best bet would be flight-mode | 09:15 |
joerg | rather tablet-mode | 09:15 |
joerg | [5 Nov 2021 19:25:38] <joerg> you killed your DMM or your N900. The circuitry in N900 as well as the circuitry in a legit Nokia BL-5J battery forbids charging to anything >4.3V | 09:18 |
joerg | *sigh* | 09:19 |
DocScrutinizer | not sure if ... | 09:20 |
joerg | ...maybe that's the problem? | 09:21 |
joerg | sicelo: what tells zzztop? | 09:22 |
KotCzarny | anyone had a problem with gcc10 and ovewriting functions? | 12:22 |
Maxdamantus | KotCzarny: you mean where gcc fixed its linkage bug that lots of code was making use of? | 13:31 |
Maxdamantus | gcc used to allow multiple compilation units to declare the same symbol, without using extern. | 13:33 |
Maxdamantus | https://gcc.gnu.org/gcc-10/porting_to.html#common | 13:34 |
KotCzarny | -fcommon fixed my problem | 13:39 |
KotCzarny | thing is, i'm overwriting funcion name depending on things | 13:39 |
KotCzarny | *function | 13:39 |
KotCzarny | and sometimes it got proper address and sometimes it was null | 13:40 |
KotCzarny | with -fno-common default in gcc10 it was kind of random behaviour | 13:41 |
KotCzarny | how do i declare function extern ? | 13:42 |
KotCzarny | its not about variable, but function | 13:42 |
Maxdamantus | Hmm.. Presumably you'd be getting a linkage error when not using -fcommon, rather than getting some random behaviour. | 13:44 |
KotCzarny | no, it linked ok | 13:45 |
KotCzarny | just was incosistent behaviour, depending which function called that overloaded function | 13:45 |
KotCzarny | (overloaded is not the right word but eh) | 13:45 |
KotCzarny | in particular example: | 13:46 |
KotCzarny | void (*oscp_s_seek)(int a); | 13:46 |
Maxdamantus | Okay, that's not a function. It's a pointer to a function. | 13:46 |
KotCzarny | then i'm setting address of that function | 13:46 |
KotCzarny | and when called, sometime function is set properly, sometimes a null | 13:46 |
Maxdamantus | Right, so only one compilation unit should have what you wrote above. The other compilation units should declare it extern. | 13:47 |
KotCzarny | how do i declare function extern? | 13:47 |
Maxdamantus | extern void (*oscp_s_seek)(int a); | 13:47 |
KotCzarny | and no, i'm not redefining it anywhere | 13:48 |
KotCzarny | just set during initialization of submodule | 13:48 |
KotCzarny | i'm doing that trick to avoid having bazillion of if/elses everywhere in the code | 13:49 |
KotCzarny | and no, i'm not defining/redefining oscp_s_seek anywhere else | 13:50 |
KotCzarny | just set the pointer during init | 13:50 |
Maxdamantus | Each compilation unit that declares it using `void (*oscp_s_seek)(int a);` is trying to declare another variable. | 13:51 |
KotCzarny | i'm declaring it only in oscp-slave.c | 13:51 |
Maxdamantus | but you want them all to refer to the same variable, so it should only be declared like that in one compilation unit, and the other compilation units should just have it as an extern. | 13:51 |
KotCzarny | unless .h declarations matter | 13:52 |
Maxdamantus | In the .h file you should probably have it as extern. | 13:52 |
KotCzarny | in every .h file i saw functions without extern, although those were normal functions, not declared as (*name) | 13:53 |
Maxdamantus | compilation units that import the .h file can still read/write to that function pointer variable, it's just that the variable is only created in one compilation unit, probably in the .c file. | 13:53 |
Maxdamantus | Right, it's different for functions. What you have is a variable, not a function. | 13:53 |
Maxdamantus | (particularly, a variable that stores a pointer to a function) | 13:54 |
KotCzarny | lets see if it compiles/works with extern | 13:59 |
KotCzarny | interesting | 14:08 |
KotCzarny | adding extern indeed fixed the symbol visibility/sharing | 14:08 |
KotCzarny | now i have to rewrite my .h generator, heh | 14:08 |
KotCzarny | it's just a thing that i wrote .h wrong for all those years | 14:10 |
KotCzarny | (and so everyone else) | 14:10 |
L29Ah | KotCzarny: are you still withholding the source code? | 14:25 |
KotCzarny | nope | 14:25 |
L29Ah | couldn't find the VCS repo | 14:26 |
KotCzarny | there is no vcs of any kind | 14:27 |
KotCzarny | just an aur package | 14:27 |
sicelo | :-) | 14:40 |
sicelo | nice! | 14:40 |
L29Ah | absolutely disgusting | 14:44 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!